Having an 'auto-upload' folder defined which I have choosen to 'syncronize'. The result was, that the folder appeared on Auf dem Gerät on my smartphone. I didn't wanted to have those files twice or double ...
/storage/emulated/0/ProgramData (which is uploaded to /OnePlus2/ProgramData)/storage/emulated/0/nextcloud/OnePlus2/ProgramDataso I decided to delete the local sync OnePlus2 which is shown under tab Auf dem Gerät ... but also /OnePlus2 folder on my nextcloud instance was deleted
From my point of view only the local sync of files should be deleted when deleting files on the tab Auf dem Gerät on your smartphone and NOT the source on the nextcloud instance ...
Android version: 8.1.0
Device model: OnePlus 2
Stock or customized system: RR-O-v6.0.0-20180530-oneplus-Official
Nextcloud app version: 3.1.0
Nextcloud server version: 12.0.7
not needed cause wrong behaviour, not an error
not needed cause wrong behaviour, not an error
The "on device" tab is only a limited view of the complete file listing, so the behaviour is the same.
If you delete a file/folder you get this dialog:

yes: delete on server and local
local only: only on device, not on server
no: nothing deleted
--> Did you accidentally clicked "yes"?
I can't remember about that 'dialogue', but will try again to see if I 'accidentally' clicked "yes"...
anyway it is confusing. the 'on device' tab should only handle 'local' files...
anyway it is confusing. the 'on device' tab should only handle 'local' files...
This is likely also a translation issue since the original/English term we use here is available offline.
It seems to be confusing for all of us ;-)
In drawer it is named "on device", which is showing all files that are downloaded (and also the parent folders):

"available offline" is for files, which then get synced if any side (local or remote) is changing.
anyway it is confusing. the 'on device' tab should only handle 'local' files...
Do we want then switch the dialog?
"Do you really want to delete welcome.txt from your device?
"yes": delete only local
"also on server": delete local & remote
"no": does nothing
@jancborchardt what do you think? Or is this bad to have the "same" action (delete) behaving different?
Delete should behave the same from wherever you do it. :)
(Which currently means showing this dialog. But yes – ideally it just deletes it off the server directly with a toast to undo. Because currently this extra modal is only useful for the case of only removing the cached version on the device, which is kind-of-edge-casey.)
which is kind-of-edge-casey
well, this is what this issue is all about.
And as @computersalat pointed out, if you do not read correctly / assume that only the local file would be deleted, this can lead to "data loss".
It seems like it might stem a from a confusion about the word "On device". Because it’s just a filter on the list of files, the same actions should apply.
Maybe renaming it to "Available offline" might be good? Of course there’s also the explicit "available offline" functionality – but files from there show up there too, and de facto all of the files "On device" are "Available offline" in the sense of the word.
The point being that deleting a file which is labeled "on the device" it makes sense to assume that it would only be deleted off the device. But for a file which also happens to be "available offline", deleting it will actually delete it.
Having two completely different things called "available offline" will confuse all.
If we want to change naming, then we should change
"on device" -> "available offline" (which will show all files/folders that are downloaded, independent if they are one-time downloaded or "available offline")
"available offline" (on files) -> "keep in sync" / permanently synced / 2way sync
(something that shows that a real sync is done. At least from my point of view, the main point is not "offline", but "sync" (as even a manually downloaded file is offline available, but will never get updated).
(we had a similar discussion ages ago and there "available offline" was chosen, but what was the previous name? I do not remember…)
Ah, found, history is (from old to new):
This is a real mess.
Once we have decided something, the internal names should reflect this.
I vote for "keep in sync".
Not sure if discussing the used term is the right first step. I'd rather would like to challenge the feature set here:
In my opinion having these 3 doesn't make much sense (from a user perspective) because:
For a first rewrite I vote for:
...because else Favorites are a subset files kept in sync _and_ in case a user favs a folder they might not want to get the whole thing mirrored to their device.
Download == Available Offline
Available offline is a periodic scan that refreshes all "available offline" files.
Rename it to Keep in sync
If we want that every downloaded file is also up to date, then we do not need "keep in sync" at all?
My concern with this approach is:
Favorite == Bookmark
Should remain favorite as it is the same as on server.
If we want that every downloaded file is also up to date, then we do not need "keep in sync" at all?
We would still need it for folders (which we do not have at all atm)
My concern with this approach is
completely agree with your point here
Should remain favorite as it is the same as on server.
Which it kind of isn't at the moment. Marking a file as Favorite in the details screen will download the file and mark it available offline!
We would still need it for folders (which we do not have at all atm)
We then would have it only for folders:
Sync would then be
When entering a "keep in sync" folder with wifi:
sync folder: download new files, update all files, delete old files
When entering a "keep in sync" folder without wifi:
When entering a regular folder (independent from wifi):
@tobiasKaminsky looks good to me, except for the last scenario
When entering a regular folder (independent from wifi)
When entering a regular folder (independent from wifi):
:+1: updated the 3 scenarios a bit
From the user perspective, I agree with @AndyScherzinger’s comment https://github.com/nextcloud/android/issues/2718#issuecomment-400926084, but would go even simpler:
That’s it.
Every favorited file should also be downloaded and kept up to date, since it seems to be so important that you favorited it.
I strongly suggest to _not_ do this because keep-in-sync != favorite, because:
TD;DR I think this needs further discussion and is a quite complex feature also looking a #2783 where users might expect no physical copy at all when opening files from the server but downloading only on demand.
Every favorited file should also be downloaded and kept up to date, since it seems to be so important that you favorited it.
For favorited files I would be fine with auto downloading it (on wifi).
But as @AndyScherzinger this should not be done automatically on folders, this is why we have "keep-in-sync".
Having two meanings of favorite (download on file / no download on folder) is strange and thus we should do no auto-downloading at all.
Another point for this:
Imagine you have 30 favorited images, where it is totally fine not to have a file downloaded, but you marked them only, that they stay on top of a folder.
--> you are forced to have a downloaded copy
So:
If an user is downloading a file, he is doing it on purpose and thus this file should be kept up to date.
Favorite is just a different and complete independent feature and should not mixed in here.
In general:
There seem to be different expectation what our app is doing (also from other issues)
Supporting both is nearly impossible to manage, so we have to choose and I would like to go for 2.
Ok, good points @AndyScherzinger. So then favorites are not downloaded by default – except if you do download them.
But then I still think that keep-in-sync is not necessary because once you use "Download", downloaded files should absolutely all be kept in sync, also for complete folders.
Which in the end is what @AndyScherzinger proposed at https://github.com/nextcloud/android/issues/2718#issuecomment-400926084, right? :) So then I agree, good direction! :rocket:
@jancborchardt Yes that is what I proposed :+1:
So, I implemented a sync job that syncs all downloaded files and removes them if they are no longer on the server.
This runs only when of unmetered wifi, and only one job at a time.
How often should this run? Currently it is 15min.
I therefore removed "keep in sync".
For folders we currently have a manual sync, which we (still) want to extend to have a real 2way sync later.
Every 15 minutes sounds fine to me and we could also improve upon this once it is on master to have some more logic for calculating the intervals based on the change frequency, if files change once a week would don't need to check every 15 minutes I guess :)
This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!
Most helpful comment
@jancborchardt Yes that is what I proposed :+1: