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

[Feature request] Option to disable auto sync with metered connections #10706

Closed
BrayanDSO opened this issue Apr 4, 2022 · 7 comments · Fixed by #12121
Closed

[Feature request] Option to disable auto sync with metered connections #10706

BrayanDSO opened this issue Apr 4, 2022 · 7 comments · Fixed by #12121
Labels
Accepted Maintainers welcome a PR implementing this feature Help Wanted Requesting Pull Requests from volunteers Sync
Milestone

Comments

@BrayanDSO
Copy link
Member

BrayanDSO commented Apr 4, 2022

Is your feature request related to a problem? Please describe.
I have auto sync enabled, but I don't want to spend my mobile data with automatic syncs. Mobile data prices can be quite a concern in some countries

Describe the solution you'd like
An option to only do auto sync on not metered connections
Extra: a dialog asking if user want to proceed on manual syncs on metered connections

Describe alternatives you've considered
None

Additional context
JsApi has something similar already #6784

@mikehardy
Copy link
Member

It's more than just wifi or not, it's "connection is metered" as in the JsAPI thing you link - I'd say just make that generic (put it in a util somewhere?), have the JsAPI reference the new util method (of course), then all the decisions are how to handle the UX

Thoughts:

  • have a toggle in settings where ever the sync config is, to toggle on sync over metered connections and default it to off (this is a change from current behavior but is actually the kindest on data plans - I live in Ecuador and lean towards default off based on my experience here)
  • check it before syncing any time - if it's a manual sync maybe pop a dialog saying "hey, it's a metered connection, are you sure?"
  • if it's an auto-sync pop a toast that says "auto-sync disabled on metered connection" with maybe a "sync anyway" button?
  • optionally have separate toggles for collection sync and media sync? Not sure if that's even possible

I am mostly just thinking out loud here. I like the root idea as it is in your title, obviously

@david-allison
Copy link
Member

I like the idea (my data is $0.17/MB if the contract runs out) - we probably want more 'sub-preference' screens, and I'd like to see 'sync' or 'auto-sync' become one of them

have a toggle in settings where ever the sync config is, to toggle on sync over metered connections and default it to off (this is a change from current behavior but is actually the kindest on data plans - I live in Ecuador and lean towards default off based on my experience here)

100%, off as a default

if it's an auto-sync pop a toast that says "auto-sync disabled on metered connection" with maybe a "sync anyway" button?

Snackbar, toasts can't have options - very similar to the 'you're offline'

optionally have separate toggles for collection sync and media sync? Not sure if that's even possible

Could we shelve this for now? Once scoped storage is off the agenda, moving 'sync' to libAnki is going to be a project - a lot of the libAnki performance improvements have made the conversion very difficult, and I'd rather avoid large changes in the sync code for the same reasons.

@mikehardy
Copy link
Member

agreed all points on that as refinements on my thinking-out-loud, except I do not agree for your sake with 17c/MB data ouch!!

@mikehardy mikehardy added Accepted Maintainers welcome a PR implementing this feature Help Wanted Requesting Pull Requests from volunteers labels Apr 14, 2022
@mikehardy
Copy link
Member

The task here - based on Brayan's idea, then David and my conversation is:

  • add a preference in the Sync area for "Sync may use metered networks", with a default to off
  • extract the existing JS API check for metered network connections so it is in a Util and is reusable
  • any time a sync is attempted
    • if the pref to sync over metered networks is false
    • and if the current network is metered
    • then display a snackbar saying "Sync over metered networks not enabled." with a "Sync anyway?" action

If any of that seems strange or could be improved, please suggest a change, otherwise this is probably good to start a PR

@github-actions
Copy link
Contributor

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

@github-actions github-actions bot added the Stale label Jun 13, 2022
@BrayanDSO
Copy link
Member Author

2 months already? Oh time flies for sure. Later, dear bot

@github-actions github-actions bot removed the Stale label Jun 13, 2022
@github-actions
Copy link
Contributor

Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accepted Maintainers welcome a PR implementing this feature Help Wanted Requesting Pull Requests from volunteers Sync
Projects
None yet
3 participants