-
Notifications
You must be signed in to change notification settings - Fork 6
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
Expand the config to support "manual only" sync #39
Comments
@stephhuerre this is the issue for the auto-sync switch. Please LMK if you have any questions. |
the related PR #41 Let us review the differences between android and iOS. So for android, we can simply choose not to trigger the periodic sync thread. So I'm going to make the following changes.
Then, take a break and work on other fixes before merging the config flag.
|
ok so one challenge with this approach is this prompt. We generate it if we don't have a stored token for the user. I haven't seen this for a really long time, but at one time it was a pretty big issue, and I don't want to remove it. After all, once we do start logging in, we may need an API key or sth to be passed in to the backend. And you should ideally have to login even for manual sync, although in that case, the operation can happen in the foreground, and maybe it is OK for the auth to fail when the plugin is initialized. We really need to figure out whether there are two separate configs for foreground login and manual sync or a single option that controls both but adds another dependency between modules. In the meanwhile, while thinking through that decision, I realized a workaround. We can just set the token to something random (e.g. Voila! No prompts, no crash, no server. |
ok so one challenge with this approach is this prompt. We generate it if we don't have a stored token for the user. I haven't seen this for a really long time, but at one time it was a pretty big issue, and I don't want to remove it. After all, once we do start logging in, we may need an API key or sth to be passed in to the backend. And you should ideally have to login even for manual sync, although in that case, the operation can happen in the foreground, and maybe it is OK for the auth to fail when the plugin is initialized. We really need to figure out whether there are two separate configs for foreground login and manual sync or a single option that controls both but adds another dependency between modules. In the meanwhile, while thinking through that decision, I realized a workaround. We can just set the token to something random (e.g. Voila! No prompts, no crash, no sync. Implemented much more quickly than any alternative. And guaranteed to work. |
Hi @shankari On the long the term I guess the user will continue to need an account anyway as the other features will require it. |
I will be re-visiting this soon. I think that the current use case is that the users will authenticate, but the sync will not happen automatically. Instead, it will happen manually when the user presses a button. (the call may not actually be the e-mission sync, but that's a different story). So it looks like we should have two different settings:
The four options are then:
Thoughts? @jf87 @PatGendre @stephaniehuerre |
@shankari yes it is a good idea to present the 4 options, it is much clearer. |
If that is turned on, then the sync can only be launched manually
The text was updated successfully, but these errors were encountered: