-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
Enable background pushing of changes to the cloud as well as automated auto-push #5054
Conversation
🎉 Ta-daaa, freshly created APKs are available for e478a00: arm64-android |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice and long requested functionality! Thanks!
Wondering about the UI, did you consider adding this in the QField settings screen? I don't think this is something you want to change every now and then and adding it where it is on the screenshot feel a bit overwhelming to me. Another option is to add a hamurger menu on the screenshoted screen, where one can choose on/off of this option.
Ideally it should be a slider similar to the way the "dim screen timeout" works.
@suricactus , thanks for the fast review, I suspected you'd be interested by this one :) Your comments have all been addressed. As for the UI, I've moved the toggle to sit below the 3 action buttons for now: We can't move it in the QField settings as it is not a app-wide setting, it is bound to the current cloud project. And as for an hamburger menu, I feel at this stage it'd just be burying the feature. IMHO, I think it's worth keeping it exposed this way for now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fast addressing of the review. Yup, agreed on your UX comment. Now it is much nicer and less error prone for fat fingers. As these cloud project settings increase in number, we can introduce the hamburger menu.
Two small comments, all the rest looks very good, thanks!
@suricactus , done. |
First, a glorious image:
Now the description 😉
This PR improves the delta file wrapper (keeping track of changes done by users) by adding an awareness of a "pushing" state. When in that state, the delta file wrapper will continue collecting changes, but will keep them pending until we either:
This means that we have a fully functional QField while pushing, insuring that no data addition/editing/deletion is loss while communicating to the cloud server.
At this stage, this already fixes a known data loss scenario: ongoing tracking would have the changes made while pushing disappear after the deltas were pushed (because until now the code assumed that no activity would happen during the pushing).
Where it gets cool is that the improvements allow us to do background pushing of changes in an automated and regular interval, which QField now does if the user toggles that option on (see above screenshot).
The auto-push every 30 minutes setting is not on by default, and is a cloud project-level setting, allowing for users to turn this on for cloud project A but not make use of it for cloud project B.