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

allow to backup/export all accounts at once #2735

Merged
merged 6 commits into from
Oct 31, 2023
Merged

allow to backup/export all accounts at once #2735

merged 6 commits into from
Oct 31, 2023

Conversation

adbenitez
Copy link
Member

@adbenitez adbenitez commented Oct 10, 2023

  • adapt backup/export dialog
  • hide the "backup all" offering if user has only one account
  • implement "export all"

⚠️ before this gets merged, would be nicer if core sets the account address in the backup filename (DONE: deltachat/deltachat-core-rust#4816)

@adbenitez adbenitez added the enhancement actually in development, user visible enhancement label Oct 10, 2023
@github-actions
Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

@link2xt
Copy link
Contributor

link2xt commented Oct 11, 2023

A lot of phones do not even have enough space for a backup of a single account. If we go this way on Android, there should be an option to select some subset of accounts in the dialog with checkboxes, and a checkbox for "all accounts" on top of this that enables all or disables all of them.

@adbenitez
Copy link
Member Author

that would get too complicated too soon, if the device doesn't have enough space then backup one by one instead of using all, anyway selecting only a subset also needs to know account size to make an informed decision and then that is more features

@github-actions
Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

@adbenitez
Copy link
Member Author

for exporting all accounts it gets a bit complicated, because there is no blocking way to call "create backup" per account, the core API for backups is async and you can't just loop over an array of accounts and call the "create backup" API, progress is received via core event and you would need to start the backup of the next account in the "progress 1000" of the previous one, etc.

would be nice to have an API that blocks until the backup is done or an API to "backup all" accounts similar to the startIO for all accounts, that would be even better/easier for the UI

cc @link2xt

@github-actions
Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

r10s and others added 2 commits October 29, 2023 19:06
this starts all backups at the same time,
overwriting different progress-dialogs as needed.
when the last "done" arrives, the progress dialog is closed.
the progress itself, is taken from the first account
(this could be improved, but maybe it is just good enough)
@github-actions
Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

@adbenitez adbenitez marked this pull request as ready for review October 30, 2023 23:52
@adbenitez adbenitez requested a review from r10s October 30, 2023 23:53
@github-actions
Copy link

To test the changes in this pull request, install this apk:
📦 app-preview.apk

Copy link
Member

@r10s r10s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@r10s r10s merged commit f89a95b into main Oct 31, 2023
2 checks passed
@r10s r10s deleted the adb/backup-all branch October 31, 2023 21:39
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 this pull request may close these issues.

3 participants