Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Account deletion confirmation dialog takes a while to appear in big accounts #3308

Closed
adbenitez opened this issue Sep 19, 2024 · 2 comments · Fixed by #3420
Closed

Account deletion confirmation dialog takes a while to appear in big accounts #3308

adbenitez opened this issue Sep 19, 2024 · 2 comments · Fixed by #3420
Labels
enhancement actually in development, user visible enhancement

Comments

@adbenitez
Copy link
Member

adbenitez commented Sep 19, 2024

this is because the computation of the account size takes a few seconds, maybe display "..." or "--" there and make the core API call in a thread to load dynamically? what will happen if user click "delete" button and the API call didn't returned yet?? (cc @link2xt)

other option would be not to display the account size, but it is nicer to know

@adbenitez adbenitez added the enhancement actually in development, user visible enhancement label Sep 19, 2024
@iequidoo
Copy link
Contributor

get_account_file_size() (if it's what is used) can fail, but nothing else should happen (i.e. it shouldn't deadlock or so). Still, it makes sense to wait when it finishes before closing the dialog window.

@link2xt
Copy link
Contributor

link2xt commented Sep 20, 2024

It is fine to remove the account even without waiting for get_account_file_size to return. It should not interfere with removing an account on Linux/Android. Size calculation may fail if you are quick enough and remove the database before get_account_file_size gets to it, so ignore any errors.

Unlike Windows, Linux may only fail to delete files if they are backing executable part of the running process, but we don't execute anything from the account folder. This is actually fixed in recent Linux 6.11 (https://lwn.net/Articles/866493/), but Android will take forever to upgrade, so it's just a fun fact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement actually in development, user visible enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants