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

feat: disable background io per account, available apis in rust and jsonrpc #5314

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Simon-Laux
Copy link
Member

@Simon-Laux Simon-Laux commented Mar 2, 2024

api: rust: add set_disable_background_io and get_disable_background_io to a Accounts (the account manager)

api: jsonrpc: add set_disable_background_io method and Account::Configured.background_io_disabled property

api: select account now starts and stops io for "background disabled" accounts

This is partly a port of the desktop "disable sync all" option, the other part is making it per account.
So you can define that an account should be excluded from background syncing.
Using this will remove the start/stop io call code complexity from desktop.

This will be useful for advanced users that want to control their network traffic:
Do not connect to a specific email account in the background unless it is actively selected:

  • like when the network is monitored and you want to hide your other accounts by disabling their background syncing.
  • or when you want to keep old accounts that have broken credentials (if the provider went down or your account got deleted) and want to save background traffic that would be wasted in trying to connect, but just getting errors

References:

  • desktop pr: TODO

TODO:

  • desktop pr
  • test it
  • maybe: writing integration tests?
  • maybe: cffi api
  • discuss it with bjoern, link2xt and others

Note that this feature for earliest 1.45, so not priority currently.

Closes #4296

…sonrpc

api: rust: add `set_disable_background_io` and `get_disable_background_io` to a `Accounts` (the account manager)

api: jsonrpc: add `set_disable_background_io` method and `Account::Configured.background_io_disabled` property

api: select account now starts and stops io for "background disabled" accounts

This is partly a port of the desktop "disable sync all" option, the other part is making it per account.
So you can define that an account should be excluded from background syncing. This can be useful for advanced users that want to control their network traffic (don't connect a specific account in the background unless it is actively selected, like when the network is monitored and you want to hide your other accounts by disabling their background syncing.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add API to enable/disable accounts in account manager
1 participant