Commit graph

6385 commits

Author SHA1 Message Date
Nextcloud bot
d094946b2d
[tx-robot] updated from transifex 2018-05-14 00:46:08 +00:00
Nextcloud bot
700d3bf7f3
[tx-robot] updated from transifex 2018-05-12 00:45:52 +00:00
ardevd
e705206ca6 utils: Replace deprecated getResources().getDrawable() with ContextCompat.getDrawable()
Resources#getDrawable(int) method was deprecated in Marshmallow in favor of the new, Theme-aware replacement.
2018-05-11 12:06:22 +02:00
ardevd
9aa4c254ed utils: Verify that context is not Null before calling context.getResources(). 2018-05-11 12:03:36 +02:00
Nextcloud bot
0a122b26ad
[tx-robot] updated from transifex 2018-05-11 00:44:29 +00:00
Nextcloud bot
baaecbb2bc
[tx-robot] updated from transifex 2018-05-10 00:49:10 +00:00
Tobias Kaminsky
a2c0ae798a
Merge pull request #2549 from nextcloud/contextNull
Context null -> npe
2018-05-09 16:23:23 +02:00
tobiasKaminsky
c362398591
fix local sorting
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-05-09 15:40:48 +02:00
Andy Scherzinger
c2ac4c4ddd
Merge pull request #2564 from nextcloud/bug-identical-sub-expression
MainApp: Fixed auto upload state check.
2018-05-09 15:10:35 +02:00
ardevd
cf9925249b MainApp: Fixed instant upload check.
The if statement should check whether instant photo uploads or instant video uploads are enabled.
2018-05-09 14:34:43 +02:00
Andy Scherzinger
35b7412bcd
Merge pull request #2565 from nextcloud/bug-authentication-urlnormalization
authentication: Fixed HTTPS prefixed URL normalization.
2018-05-09 14:28:12 +02:00
ardevd
3da9b5f12e authentication: Fixed HTTPS prefixed URL normalization.
I'm assuming here that the if statement is supposed to be checking whether the normalized URL starts with HTTP or HTTPS. The current version seemingly has a typo which this commit fixes.
2018-05-09 13:22:47 +02:00
ardevd
cd0268220e MainApp: Removed identical sub-expression in if statement.
This is almost certainly a mistake. Using the same value on either side of a binary operator makes no sense.
2018-05-09 13:12:22 +02:00
AndyScherzinger
200e5aac07
center tabs 2018-05-09 11:34:04 +02:00
AndyScherzinger
1349c2648c
fix lint issues 2018-05-09 11:34:02 +02:00
AndyScherzinger
e047df0f4a
fix theming/tinting for tab indicator 2018-05-09 11:34:02 +02:00
AndyScherzinger
70a9c9584d
add theming/tinting for sharing headers 2018-05-09 11:34:01 +02:00
AndyScherzinger
dc771a8d67
implemented pull-to-refresh for activities 2018-05-09 11:34:01 +02:00
AndyScherzinger
7c21f46b89
fix empty activities icon 2018-05-09 11:34:00 +02:00
AndyScherzinger
c7d8171be1
fix use of asyncDrawable 2018-05-09 11:33:59 +02:00
AndyScherzinger
27a2041db5
codacy cleanup + fixed javaDoc 2018-05-09 11:33:59 +02:00
AndyScherzinger
5934bbfe9a
also use standard character avatars for sharees instead of grey icons (just for iteration 1, soon tobe replaces by the new details&sharing implementation) 2018-05-09 11:33:58 +02:00
AndyScherzinger
adb9ab24ef
cleanup details fragment, use standard character avatars for sharees instead of grey icons (just for iteration 1) 2018-05-09 11:33:58 +02:00
AndyScherzinger
57e061ed8d
uncomment unused method/calls for use whenever we switch to glide 2018-05-09 11:33:57 +02:00
AndyScherzinger
941f621fcc
implement set available offline via menu 2018-05-09 11:33:57 +02:00
AndyScherzinger
60a497a9af
load center cropped preview image, hide type icon 2018-05-09 11:33:56 +02:00
tobiasKaminsky
0a8822a767
load resized image in header
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-05-09 11:33:56 +02:00
AndyScherzinger
ca7e60b9ea
codacy: combined nested if statements 2018-05-09 11:33:55 +02:00
AndyScherzinger
af4918deaf
WiP preview image in toolbar 2018-05-09 11:33:54 +02:00
AndyScherzinger
6952e647bc
further optimize menu item filtering code 2018-05-09 11:33:54 +02:00
AndyScherzinger
e42ff25b92
move menu filtering to menu filter helper 2018-05-09 11:33:53 +02:00
AndyScherzinger
ce66e125e2
simplify menu item filtering code 2018-05-09 11:33:53 +02:00
AndyScherzinger
46f226ba3a
move menu to file name, hide tags (to be implemented later) 2018-05-09 11:33:52 +02:00
tobiasKaminsky
19edfb183a
filter activity by file Id
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-05-09 11:33:51 +02:00
AndyScherzinger
d1ba80eb4a
cleanup 2018-05-09 11:33:51 +02:00
AndyScherzinger
6013956150
organize imports 2018-05-09 11:33:50 +02:00
AndyScherzinger
7ff4f4e378
add initial loading of (all, not file specific) activities 2018-05-09 11:33:50 +02:00
AndyScherzinger
dd050b0dc6
new lines and license headers 2018-05-09 11:33:49 +02:00
AndyScherzinger
254ac96795
WiP for #2485 2018-05-09 11:33:48 +02:00
Nextcloud bot
14a127eb7f
[tx-robot] updated from transifex 2018-05-09 00:40:59 +00:00
Nextcloud bot
aa6fc038c7
[tx-robot] updated from transifex 2018-05-08 00:41:44 +00:00
Nextcloud bot
d82ff62d30
[tx-robot] updated from transifex 2018-05-07 00:41:01 +00:00
Nextcloud bot
57d96761ac
[tx-robot] updated from transifex 2018-05-05 00:42:00 +00:00
Andy Scherzinger
4ce3900025
Merge pull request #2548 from nextcloud/lastindexof_performance
datamodel: String function use should be optimized for single characters
2018-05-04 16:55:01 +02:00
Andy Scherzinger
6047604ad5
Merge pull request #2545 from nextcloud/ortiztouch-switchbug
ortiz.touch: End switch case with an unconditional break.
2018-05-04 16:51:24 +02:00
AndyScherzinger
d7f223685e
organize imports 2018-05-04 16:20:20 +02:00
AndyScherzinger
cd9bfb12b8
Fix CR 2018-05-04 16:15:17 +02:00
ardevd
b1ef83524c
Anonymous inner classes containing only one method should become lambdas
Before Java 8, the only way to partially support closures in Java was by using anonymous inner classes. But the syntax of anonymous classes may seem unwieldy and unclear.

With Java 8, most uses of anonymous inner classes should be replaced by lambdas to highly increase the readability of the source code.
2018-05-04 16:15:16 +02:00
tobiasKaminsky
b5038e36fb
context null -> npe
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-05-04 14:10:47 +02:00
ardevd
3a01e07afc datamodel: String function use should be optimized for single characters
An lastIndexOf call with a single letter String can be made more performant by switching to a call with a char argument.
2018-05-04 09:18:30 +02:00
ardevd
58e4360630 ui: Corrected '&' to '&&' in boolean if statement.
The use of non-short-circuit logic in a boolean context is likely a mistake - one that could cause serious program errors as conditions are evaluated under the wrong circumstances.
2018-05-04 09:06:21 +02:00
ardevd
851d065ace ortiz.touch: End switch case with an unconditional break.
When the execution is not explicitly terminated at the end of a switch case, it continues to execute the statements of the following case. While this is sometimes intentional, it often is a mistake which leads to unexpected behavior
2018-05-04 08:59:54 +02:00
Nextcloud bot
3c5cc68005
[tx-robot] updated from transifex 2018-05-04 00:43:52 +00:00
Andy Scherzinger
fdd9c9f942
Merge pull request #2540 from nextcloud/activities-ondestroy-override
activities: A couple of code quality fixes for the Activities component
2018-05-02 23:04:55 +02:00
eho
04da4de923 authentication: Renamed Bundle object in onCreate(). 2018-05-02 19:19:25 +02:00
ardevd
8fd8577aea authentication: Added @Override annotations to applicable methods.
Using the @Override annotation is useful for two reasons :

It elicits a warning from the compiler if the annotated method doesn't actually override anything, as in the case of a misspelling.
It improves the readability of the source code by making it obvious that methods are overridden.
2018-05-02 17:20:49 +02:00
ardevd
ffb9ad4151 data: Added private constructor for the Injection utility class.
Utility classes, which are collections of static members, are not meant to be instantiated. Even abstract utility classes, which can be extended, should not have public constructors.

Java adds an implicit public constructor to every class which does not define at least one explicitly. Hence, at least one non-public constructor should be defined.
2018-05-02 16:15:46 +02:00
ardevd
ab6fa36f9b activities: Use isEmpty() to check whether the list of activities is empty.
Using Collection.size() to test for emptiness works, but using Collection.isEmpty() makes the code more readable and can be more performant
2018-05-02 16:12:47 +02:00
ardevd
4d786a3f41 activities: Added @Override annotation above the onDestroy() method signature.
Using the @Override annotation is useful for two reasons:

It elicits a warning from the compiler if the annotated method doesn't actually override anything, as in the case of a misspelling.
It improves the readability of the source code by making it obvious that methods are overridden.
2018-05-02 16:11:11 +02:00
Andy Scherzinger
66deeb7731
Merge branch 'master' into 2474-feature-mvp-activities 2018-05-02 15:39:15 +02:00
ardevd
385bb429c7 passcodemanager: Reordered auth type check statements. 2018-05-02 14:45:15 +02:00
ardevd
2f0464d6e4 passcodemanager: Simplified passcode/fingerprint auth timeout check. 2018-05-02 14:37:06 +02:00
ardevd
40e3c050b2 authentication:passcodemanager: long literal '0l' should be 0L.
The suffix L is preferred, because the letter l (ell) is often hard to distinguish from the digit 1 (one).
2018-05-02 14:34:08 +02:00
ardevd
6fcfa840b7 authentication:passcodemanager: Cleaned up variable naming. 2018-05-02 14:19:36 +02:00
ardevd
b8cde0fa86 authentication:passcodemanager: Stricter variable declaration. 2018-05-02 13:56:28 +02:00
ardevd
2615926163 authentication:passcodemanager: Simplified if-statements. 2018-05-02 13:55:07 +02:00
ardevd
81f72a50c4 authentication:passcodemanager: Stricter access declaration. 2018-05-02 13:54:39 +02:00
ardevd
786ffd2c44 authentication:passcodemanager: Explicit argument type removed. 2018-05-02 13:53:56 +02:00
ardevd
c8b3f1e168 data:activities Added newline at the bottom. 2018-05-02 13:50:18 +02:00
ardevd
81f4f2a767 authentication: Cleaned up variable name in PassCodeManager. 2018-05-02 13:45:17 +02:00
ardevd
c079d8c285 data:files Properly return callback.onError if remoteOcFile is null. 2018-05-02 13:08:22 +02:00
ardevd
49d0ccac7d data:files Cleaned up onPostExecute() if-statements. 2018-05-02 12:54:43 +02:00
ardevd
9efa675c2a activities: Removed hungarian variable name notation. 2018-05-02 12:38:33 +02:00
Nextcloud bot
0556586232
[tx-robot] updated from transifex 2018-04-30 00:41:33 +00:00
eho
07770a2268 activities: Added copyright headers 2018-04-29 19:49:54 +02:00
Nextcloud bot
8a1cb0b37a
[tx-robot] updated from transifex 2018-04-29 00:44:16 +00:00
Nextcloud bot
f84db51efa
[tx-robot] updated from transifex 2018-04-28 00:42:16 +00:00
Nextcloud bot
cd48dd7335
[tx-robot] updated from transifex 2018-04-27 00:42:51 +00:00
AndyScherzinger
6f60447665
lint: fix implicitly using the default locale is a common source of bugs: Use toLowerCase(Locale) instead. For strings meant to be internal use Locale.ROOT, otherwise Locale.getDefault(). 2018-04-26 18:01:40 +02:00
AndyScherzinger
9916aecfa9
lint: fix set android:baselineAligned="false" on this element for better performance 2018-04-26 18:01:39 +02:00
AndyScherzinger
b8a4c4e8d6
lint: fix the image ic_favorite.png varies significantly in its density-independent (dip) size across the various density versions (ic_ needs to comply with standard icon sizes) 2018-04-26 18:01:39 +02:00
AndyScherzinger
34e9b55632
lint: fix the image ic_account_circle.png varies significantly in its density-independent (dip) size across the various density versions 2018-04-26 18:01:38 +02:00
AndyScherzinger
ee736ce214
lint: fix This tag and its children can be replaced by one <TextView/> and a compound drawable _and_ unnecessary parent element 2018-04-26 18:01:37 +02:00
AndyScherzinger
4a8de18d49
lint: fix attribute networkSecurityConfig is only used in API level 24 and higher (current min is 14) 2018-04-26 18:01:37 +02:00
AndyScherzinger
6b6716dc72
lint: fix attribute splitTrack is only used in API level 21 and higher (current min is 14) 2018-04-26 18:01:36 +02:00
AndyScherzinger
ea2ed935f9
lint: Fix the resource R.string.upload_list_loading appears to be unused 2018-04-26 18:01:35 +02:00
AndyScherzinger
3e1d80af43
lint: fix the resource R.layout.list_fragment_expandable appears to be unused 2018-04-26 18:01:35 +02:00
AndyScherzinger
8ec30ad52f
lint: fix possible overdraw: Root element paints background @color/background_color with a theme that also paints a background (inferred theme is @style/Theme.ownCloud.Toolbar) 2018-04-26 18:01:30 +02:00
Andy Scherzinger
ab3230775a
Merge pull request #2512 from nextcloud/2507-bugfix-intentmode
Preferences: Don't start FileDisplayActivity when pressing the back button
2018-04-26 17:57:50 +02:00
tobiasKaminsky
a63c29ac5f
do not sort on getFolderContent
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-04-26 13:37:51 +02:00
AndyScherzinger
bca8c493ab
Fix CR 2018-04-26 13:18:45 +02:00
AndyScherzinger
382f4942ae
Fix CR 2018-04-26 13:16:01 +02:00
AndyScherzinger
9ef32d8847
Fix CR 2018-04-26 13:16:01 +02:00
AndyScherzinger
1167d46d93
added more information on initial connection error 2018-04-26 13:16:00 +02:00
eho
7982c08c13
Preferences: Don't launch a new intent when hitting the back button.
It doesn't really make sense to launch a hard coded activity when navigating back from the Preferences activity. The expected behavior is probably to return the user to the previous activity rather than always throwing them back to the FileDisplayActivity.
2018-04-26 11:24:55 +02:00
tobiasKaminsky
f6c650d046
Activites -> Activities
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-04-26 11:13:18 +02:00
ardevd
e4b20211ec data: Removed unused private fields. 2018-04-26 10:18:20 +02:00
ardevd
da931e44dc activities: Set nextPageUrl to null when manually refreshing activities.
When the user swipes the recycler view to refresh the list of activities we want the list to be cleared and populated with the newest activities without loading all the other paginated activities that might have been loaded up to that point. Therefore we set the nextPageUrl variable to null in the setOnRefreshListener for the swipeRefreshLayout.
2018-04-26 08:45:07 +02:00
ardevd
6f106952f9 activities: Updated usage of the loadActivities() contract method. 2018-04-26 08:39:20 +02:00
ardevd
c68edcf7a8 activities: Fixed typo in contract interface method. 2018-04-26 08:38:24 +02:00
Nextcloud bot
884917653e
[tx-robot] updated from transifex 2018-04-26 00:42:56 +00:00
AndyScherzinger
13baa9c32f
removed margin left to really center headline, added empty line at the end of the file 2018-04-24 19:25:28 +02:00
artem-p
fdb1fb6e97
increase spacing above and below the top header 2018-04-24 19:25:28 +02:00
artem-p
7af202ded8
position whats new details title and text 2018-04-24 19:25:28 +02:00
artem-p
2ac1a3ae4a
whats new title is not bold 2018-04-24 19:25:25 +02:00
Nextcloud bot
309f1e6f97
[tx-robot] updated from transifex 2018-04-24 09:09:48 +00:00
Andy Scherzinger
83934655b1
Merge pull request #2503 from nextcloud/2502-npefix
adapter: Pass valid context to setImageDrawable()-call.
2018-04-24 09:50:40 +02:00
Nextcloud bot
6cf36914d3
[tx-robot] updated from transifex 2018-04-24 00:42:46 +00:00
ardevd
eab58accd7 layout: Formatting fixes for the activity_list_layout xml. 2018-04-23 14:03:32 +02:00
ardevd
8168063ae4 data:files Simplified onPostExecute processing. 2018-04-23 13:47:56 +02:00
ardevd
162fdb9d8a tests: Added unit tests for the RemoteFilesRepository class.
Provides 100% coverage of the RemoteFilesRepository class.
2018-04-23 13:45:23 +02:00
ardevd
99122f1467 tests: Added unit tests for the RemoteActivitiesRepository class. 2018-04-23 13:40:31 +02:00
ardevd
ca6cd76f0b adapter: Pass valid context to setImageDrawable()-call.
Fixes #2502.
2018-04-23 13:26:23 +02:00
ardevd
9a9a4629e0 tests: Updated ActvitiesPresenter unit tests with the new interface methods. 2018-04-23 13:25:25 +02:00
ardevd
5998438f12 activities: Correctly handle the nextPageUrl parameter.
This should be managed by the activity and not the data repository API since the latter has no track of state.
2018-04-23 13:24:49 +02:00
ardevd
81a300077c test: Added unit tests for the Activities Presenter.
This provides 100% coverage of the Activities Presenter class.
2018-04-23 12:59:42 +02:00
ardevd
3fd750c871 activities: Removed legacy ActivitesList activity 2018-04-23 12:40:55 +02:00
ardevd
45755395c4 activities: Cleaned up activity class.
Removed unused imports and objects.
2018-04-23 12:40:45 +02:00
ardevd
dd9a029d18 activites: Any theming call has now context, instead of app context (from master) 2018-04-23 12:38:30 +02:00
ardevd
03e0e181a2 Merge remote-tracking branch 'origin/master' into 2474-feature-mvp-activities 2018-04-23 12:35:38 +02:00
ardevd
94fa9dc0bf activites: Use correct ActionListener method for showing File details. 2018-04-23 12:33:59 +02:00
ardevd
855e06c912 data:files Return descriptive error message if null is returned.
TODO: Use string resources instead of hardcoded strings.
2018-04-23 12:33:30 +02:00
ardevd
a2dad4ec4f data:activities: Fix onPostExecute success handling.
Missing else block resulted in error message being returned every time.
2018-04-23 12:27:33 +02:00
ardevd
5acfe5c201 activities: Refactored Remote file read operations.
Use the File repository instead of the local AsyncTask implementation.
2018-04-23 12:19:01 +02:00
ardevd
9fde4ba10d data: Added Injection class for injection data repositories. 2018-04-23 12:18:06 +02:00
ardevd
c0044bddc1 data:files Added file repository classes and interfaces.
This provides a centralized asynchronous repository for all remote File operations. Currently only supports ReadRemoteFile as required by the activities activity.
2018-04-23 12:17:46 +02:00
ardevd
ad49754f42 activities:data Activites Service API AsyncTask should be static to avoid leaks 2018-04-23 11:42:35 +02:00
ardevd
0fe1bfcb03 activities:data: Refactored directory structure. 2018-04-23 11:32:24 +02:00
tobiasKaminsky
a52b75eeed
use userId for webdav search
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-04-23 10:34:25 +02:00
Andy Scherzinger
51443428d1
Merge pull request #2394 from nextcloud/themingWithContext
Any theming call has now context, instead of app context
2018-04-23 07:02:31 +02:00
Nextcloud bot
213f738a2a
[tx-robot] updated from transifex 2018-04-23 00:41:30 +00:00
AndyScherzinger
9b1335b784
lint: remove unused string 2018-04-22 23:20:01 +02:00
AndyScherzinger
ad8755d329
fix API call 2018-04-22 22:56:01 +02:00
AndyScherzinger
2819ffd779
fixes after rebase 2018-04-22 22:32:57 +02:00
tobiasKaminsky
e677eab62d
changes due to rebase
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-04-22 20:36:19 +02:00
tobiasKaminsky
5b432b3ed0
Any theming call has now context, instead of app context
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-04-22 20:36:15 +02:00
tobiasKaminsky
941a5bd508
prevent illegalArgumentException on generating preview 2018-04-22 20:22:03 +02:00
tobiasKaminsky
16d578cde1
fix e2e: file input stream overwrote tmpFile
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-04-22 19:57:36 +02:00
Andy Scherzinger
1bcf3f518d
Merge pull request #2487 from nextcloud/themeContactsBackup
Correct theming for contacts backup fragment: actionbar, buttons
2018-04-22 19:53:59 +02:00
Andy Scherzinger
59c68da097
Merge pull request #2488 from nextcloud/useCorrectAccountOnContact
ContactBackup: use always account of calling activity
2018-04-22 19:52:11 +02:00
Andy Scherzinger
4ba4341e14
Merge pull request #2449 from nextcloud/fixNPE
prevent NPE via null check
2018-04-22 19:50:09 +02:00
Andy Scherzinger
f3e3a8ea6d
Merge pull request #2479 from nextcloud/notificationOn8
fix failing notification on >= 8
2018-04-22 19:47:54 +02:00
Andy Scherzinger
418cecf4f2
Merge pull request #2493 from nextcloud/dynamicName
Show themeable cloud name instead of hardcoded nextcloud
2018-04-22 19:43:16 +02:00
Andy Scherzinger
306044e3dc
Merge pull request #2489 from nextcloud/noUploadIconGrey
Tint no upload icon grey
2018-04-22 19:25:51 +02:00
AndyScherzinger
f3e15b565c
replace Nextcloud with %1$s 2018-04-22 19:24:57 +02:00
AndyScherzinger
f35ef37f6b
fix lint: legacy fab styling 2018-04-22 19:14:37 +02:00
AndyScherzinger
47805ba50f
fix TW string 2018-04-22 19:07:13 +02:00
tobiasKaminsky
2143fc49a5
show themeable cloud name instead of hardcoded nextcloud
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-04-22 19:07:12 +02:00
tobiasKaminsky
18137d16eb
rebased
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-04-22 18:23:22 +02:00
tobiasKaminsky
982184265e
show correct error message if virus is detected:
- in notification message, even with correct virus name
- in upload list: generic virus warning

do not try to resume virus upload automatically, as it is useless, but still the user can retry it manually

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
2018-04-22 18:23:22 +02:00