Sync downloaded#2886
Conversation
c421e0b to
787dfaa
Compare
|
Would this support folders too? |
|
Currently not as we do not have (yet) any possibility in UI to set "available offline" for folders. We should discuss this properly and then implement it in a separate PR. |
| ocFolder.setEtagOnServer(updatedEtag); | ||
| storageManager.saveFile(ocFolder); | ||
| } catch (Exception e) { | ||
| Log_OC.e(TAG, "Failed to update etag on " + folder.getAbsolutePath()); |
There was a problem hiding this comment.
should also log the exception, else you just know it failed but not for which reason
|
👍 looks good code-wise and also worked for me for the browsing scenario. Didn't test the actual sync though. I also agree that we should have the folder variant in a different PR and that would be close to a two way sync while for example deleting a file on the client asks you if you want to delete the file on the server too, so that is rather a one way sync server->client + syncing back changed files to the server not sure if we should handle created files since that would mean someone created a file within the clients directory structure. |
787dfaa to
43458a3
Compare
|
Imho this needs another DB version and a change routine to remove the fields from the database |
There is no way in sqlite to remove an existing column. |
fef9db0 to
8ccaffb
Compare
9531702 to
faaa55b
Compare
ebad8bf to
64530cf
Compare
|
Looks decent, but why are there so many Glide changes in there? |
7999299 to
eb20d3b
Compare
|
@sehucke this is a very good feedback, thank you. However I vote for merging this right now, as the meaning of icons stay the same and open up a new discussion how to improve this. |
I second that! |
|
👍 |
04dd432 to
dfccba5
Compare
|
Rebased, should now compile again |
|
@tobiasKaminsky Codacy issues at least + build failed and I can then take a look. |
|
Strange, only this PR is failing on tests, while e.g. #3350 is building fine: https://drone.nextcloud.com/nextcloud/android/7129 So I suggest, we ignore it ;-) |
|
Hm. Seems indeed to be a valid problem: |
|
👍 works fine for me, I had
Thus merging |
|
@mario what do you think? Works fine for me (at least what I tested of course) |
|
Would this allow for downloading/exporting a file from NC that is not affected by the sync? E.g. if I want to download/export a file from NC to my local Download folder and not Android/Media/com.nextcloud.android? At least for me, I don't have a Save to Device in the Share menu for a file in NC (as I have in Dropbox). |
|
@matsest No but you probably don't need that. SImply hit the share icon and choose an installed app, which allows for that e.g. Amaze File Manager :) (didn't test if this works though) |
|
@AndyScherzinger Yes, that works with Amaze - have tested. However, it does not work with my default Files app (it's a crappy default Huawei app in EMUI), i.e. which is what "Save to Device" is in a range of other apps. I don't know much work there is to enable support for sharing to all these different CMFiles, Huawei Files app and other vendor specific default file apps. But it's a nice feature to be able to share across apps.. That's what I like about the sharing menu in Android - I probably don't need to be able to share a SMS to my Snapchat app (a crude example) and 15 other apps in the pop-up, but Android share menu allows for these interfaces between almost every app. Specifically for a file sync app like NC I think it's a good idea that manual export/save to device should be possible without installing a third-party app for users - in addition to the offline/sync feature in this PR. That being said, I love Amaze and prefer it over default Files in EMUI, so I won't shed tears if this isn't taken into development ;) Sorry if this was off topic for the PR (: |
That is the problem: if you save a file to a folder outside NC it will never get updated. Therefore I am not a big fan of doing this. |
|
Please make sure to drop the columns that we don't use anymore in the newest DB migration/transaction. Otherwise good. |
:-D :-D |
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
e41f1dc to
6cf4998
Compare
|
As this was previously based on glide branch, I forgot to remove the "update thumbnail" stuff. |
Lint
FindBugs (new)
FindBugs (master)
|
Enhancement discussed in #2718
TODO