android icon indicating copy to clipboard operation
android copied to clipboard

Automatic download for already downloaded file when file updated?

Open ghost opened this issue 12 years ago • 28 comments

I just ran into this issue:

A few days ago I downloaded a file with Android ownCloud -> Green triangle with down arrow appeared.

Today I wanted to view the file again (it was updated on the server in the mean time). The file date was updated, so Android ownCloud detected a file change. The green triangle stayed however. When selecting the file, it opened the old version of the file (which I of course noticed too late).

Solution: Long click on file "Update file". This is not intuitive.

Possible fixes:

Suggestion A: Delete offline file when update is detected (green triangle dissappears as soon file date changes).

Suggestion B: When clicking an updated file warn user that file has changed on server and suggest to download uptodate copy.

Suggestion C: When clicking file, download new version. In case of no connection, suggest to open old version of file.


EDITED @rperezb and @owncloud/android-developers :

  • Taking into account the feedback in this issue as well as the current behavior of the ownCloud iOS app the option selected is *C - When clicking file, download new version. In case of no connection, open old version of file *
  • In case of conflict (different versions local and server) the way to go is the regular one:
    • Open the local version
    • Set the file as conflict one (labelled with the icon)
    • Fix the conflict taking advantage of the sync option where the user will be offered to rename, duplicate or cancel

EDITED @malkomich: TASKS

  • [x] [GIT] Create 333_update_server_changes_on_download_files branch from master in android repo @malkomich
  • [x] [DEV] Perform a sync operation when the file is opened @malkomich
  • [x] [DEV] Launch an advise and capture it when the sync/download operation finish @jabarros
  • [x] [DEV] Update dinamically the content of the file on the file preview @jabarros
  • [X] [QA] Create 333_update_server_changes_on_download_files branch from master in QA repo @jesmrec
  • [X] [QA] Merge 333_update_server_changes_on_download_files branch into master in QA repo (PR #1736)
  • [X] [QA] Create test plan @jesmrec
  • [X] [QA] Validate test plan @mcastrosg
  • [ ] [GIT] Merge 333_update_server_changes_on_download_files branch into master in android repo

BUGS

  • [X] Media files (audio and video) are not refreshed when a new version is downloaded from the server https://github.com/owncloud/android/issues/333#issuecomment-232604878 [FIXED]
  • [X] Image files are not refreshed with the new version when clicked [FIXED]
  • [ ] Too many messages "file is already synced" [READY_TO_TEST]
  • [X] Not previewable files are not refreshed with the new version when clicked [FIXED]
  • [X] Track download progress in previews when a fresh version of the file is downloading in background [FIXED]
  • [ ] Conflict resolved with both files does not end properly. https://github.com/owncloud/android/issues/333#issuecomment-234173901
  • [X] App crashes after set a photo as available offline and tap on another photo https://github.com/owncloud/android/issues/333#issuecomment-234195282 [FIXED]
  • [X] Available offline state is not shown properly https://github.com/owncloud/android/issues/333#issuecomment-234197374 [FIXED]

ghost avatar Dec 14 '13 19:12 ghost

Pinging @jancborchardt and @javiergonzper to have a look here. Something in this sense is being done in the iOS app in this sense, but I don't have the details in my head.

davivel avatar Jan 08 '14 10:01 davivel

Yes, a notice like »filename was updated on the server.« would be good. Then with options to »View old file« or »Download new version«.

jancborchardt avatar Jan 08 '14 12:01 jancborchardt

I think the file should be updated when clicking on it without any saying (or "file was updated on server. Downloading new version"). But no option as the user has downloaded the file time ago and at least for me there is no use in presenting him an old version/different version than the one on the server.

tobiasKaminsky avatar Oct 25 '14 10:10 tobiasKaminsky

I totally agree with @tobiasKaminsky. Anything else is just too complicated. Even when the file is a bit bigger and you’re on mobile, you would still see the download bar and be able to cancel it.

jancborchardt avatar Oct 26 '14 13:10 jancborchardt

I agree with @tobiasKaminsky and @jancborchardt the file should be updated when clicking on it. it's probably the simplest and most logical behavior.

jeremy447 avatar Mar 17 '16 13:03 jeremy447

This is really annoying :( That lead to loss of content. Can the file be updated when clicking on it please ? Thanks !

jeremy447 avatar May 12 '16 14:05 jeremy447

Validated, but not merged yet.

I'll go for that.

davivel avatar Jul 13 '16 11:07 davivel

Bug

Steps

  1. Upload from app a new mediafile (video/audio)
  2. Set the file as av. offline
  3. Connect to the server using a browser and replace the file with another audio/video
  4. On app pull down on the folder that contains the file in order to update
  5. Press on the media file and check that the updated version is reproduced.

Actual behaviour

App does not reproduce the updated version, just the old one.

Expected behaviour

Updated version should be reproduced.

Device: Nexus 5 Android Version: 6.0

mcastroSG avatar Jul 14 '16 08:07 mcastroSG

OK. Taking care. The steps are not exactly what this issue is about, but the cause of failure is.

davivel avatar Jul 14 '16 08:07 davivel

Problem with video and audio files are fixed now; but, I discovered similar problems with other files. I updated the first comment with new bugs.

davivel avatar Jul 18 '16 10:07 davivel

Image files are also refreshed with updates in server.

Going for the next.

davivel avatar Jul 18 '16 11:07 davivel

Bothering dialogs and toasts out of sight. Going for the next.

davivel avatar Jul 18 '16 11:07 davivel

@mcastroSG , I'm done. Let's talk about those problems with background sync

davivel avatar Jul 20 '16 15:07 davivel

Bug

Steps

  1. Upload from browser a new pic to the server
  2. Pull down on the app to refresh
  3. Tap on the pic to download it
  4. Upload a different pic with the same name from browser to server
  5. Pull down on the app to refresh
  6. Tap on the pic to download it again

Actual behaviour

Image is not updated with new version

Expected behaviour

Old image should appear while new version is downloaded and at this point the image should change to the new.

Device: Nexus 5 Android Version: 6.0

mcastroSG avatar Jul 20 '16 15:07 mcastroSG

Should be fixed now, @mcastroSG

davivel avatar Jul 20 '16 17:07 davivel

Bug

Steps

  1. Create a new txt file on root server folder
  2. Pull down on root folder to refresh
  3. Tap on txt file to download it
  4. Set wifi off on mobile device
  5. Edit txt file on mobile device
  6. Edit txt file on server
  7. Enable wifi on mobile device
  8. Pull down on root folder to refresh
  9. Tap on txt file
  10. Select Keep both files on Conflict Dialog

Actual behaviour

We obtain two final files but progress upper bar does not stop and X button to cancel does not work anymore, seems that once process ends current view is not refreshed or ended.

Expected behaviour

We obtain two final files and once we have resolve the conflict file view appears on screen again.

Device: Nexus 5 Android Version: 6.0

mcastroSG avatar Jul 21 '16 07:07 mcastroSG

Bug

Steps

  1. Long push on a photo to select it and enable available offline
  2. Tap on the same file in order to unselect it
  3. Tap on another photo

Actual behaviour

App crashes

Expected behaviour

App should not crash

Device: Nexus 5 Android Version: 6.0

mcastroSG avatar Jul 21 '16 08:07 mcastroSG

Bug

Steps

  1. Create a new txt file on server
  2. Pull down on app to refresh
  3. Tap on the file
  4. Select from three dots button available offline

Actual behaviour

There is no overlay icon associated to available offline, even after pull down again to refresh. In order to get the proper overlay we have to navigate to other folder and come back.

Expected behaviour

A new overlay icon should appear and in case we push three dots button Unset available offline option should appear too.

Device: Nexus 5 Android Version: 6.0

mcastroSG avatar Jul 21 '16 09:07 mcastroSG

Thanks, @mcastroSG . I'll fix the new bugs now.

davivel avatar Jul 21 '16 10:07 davivel

He, the third one is a classic. But maybe I had an idea :)

davivel avatar Jul 21 '16 10:07 davivel