owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.82k stars 3.05k forks source link

[BUG] Wrong navigation when adding new account #4304

Closed JuancaG05 closed 2 months ago

JuancaG05 commented 8 months ago

Actual behaviour

When adding a new account in a device where we already have at least one account, coming back to the file list keeps showing the files from the previous account, although the Manage accounts screen and the top bar indicates we are in the new one. To solve this, currently we need to switch to the previous account and go again to the new one, which is very annoying.

Expected behaviour

When adding a new account and going back to the file list, the files shown should be the ones from the new account.

Steps to reproduce

  1. Add at least one account to the ownCloud app
  2. Add another account
  3. When added, you can see that the file list is the one from the previous account
  4. (Optional) If you want to see the correct file list, you need to switch to the previous account and go again to the new one

In the next video these 4 steps are shown:

https://github.com/owncloud/android/assets/57049315/814403e6-1771-4785-9b0c-c2924845310f

Can this problem be reproduced with the official owncloud server? (url: https://demo.owncloud.org, user: test, password: test) Yes, it's a problem on the app side so the server is not involved here.

Environment data

Android version: 9

Device model: Samsung Galaxy S9

Stock or customized system: Stock

ownCloud app version: 4.2-beta.1 (3cce58d)

ownCloud server version: no matter

v-a14 commented 7 months ago

@JuancaG05 This bug is not reproducing now ?

JuancaG05 commented 7 months ago

Hi @v-a14! Yes, I just tested and it keeps reproducing. If you detected it's not always reproducible, then this can be related to a race condition that only happens in certain situations, but we should solve it for every case. Do you dare to take a look at it? 🚀

jesmrec commented 3 months ago

Needs to check if it is fixed. If it is, ready to close.

jesmrec commented 2 months ago

The new "Manage Account" menu in a dialog is preventing this bad effect. When adding new accounts, the current list of files is the one corresponding the recently attached account.

It is fixed.

Closing, feel free to reopen if you are able to reproduce again.