jasminb / megastoragemanager

Android application providing sync and data management tools for mega cloud storage
5 stars 2 forks source link

Incorrectly calculated count of download items #10

Closed ja02 closed 9 years ago

ja02 commented 9 years ago

Cloud contains /Folder1 and /Folder2. Long-tap Folder1 to select it, then short-tap Folder2 to select it too. Tap the Download button on the toolbar. The confirmation dialog says the number of items to download is 1, but should be 2 (it then correctly downloads both folders).

jasminb commented 9 years ago

Only files are counted, folders are not. Should we count both?

ja02 commented 9 years ago

I don't know how the cloud API looks like. If you need to make a separate call to download the folder, then yes, I would suggest to calculate it in. If that's not the case (e.g. you already have the cloud tree cached locally, so the app can just go ahead and create the folder), then I would suggest to rename the label to Files count.

jasminb commented 9 years ago

I would rather count the folders in, renaming the label means changing the localisation files.

jasminb commented 9 years ago

Fixed in MEGA-2.1.0-test3.apk (all items are counted, both folders and files)

ja02 commented 9 years ago

On 2.1.0-test3 app behaves differently, but items count still wrong:

  1. Cloud has a folder Folder1, which contains 2 files f1.txt and f2.txt.
  2. Switch to tab Cloud, go to folder Folder1, long-tap f1.txt to select it, short-tap f2.txt to select it too. Tap the Download button in the toolbar. Confirmation popup pops up.

Error: Items count is 4 (probably calculated download of Folder1 twice. Expected: Items count should be 2 (please note that here we are downloading just the files, to a predefined local path. The folder Folder1 doesn't have to be created locally, which is different situation than when a sync is being set up).

jasminb commented 9 years ago

Good catch! Will fix it in next build.

jasminb commented 9 years ago

Fixed in MEGA-2.1.0-test4.apk

ja02 commented 9 years ago

Verified in 2.1.0-test4.