Closed martinburchell closed 12 months ago
Yes, good idea. The options might be (1) fetch regardless (likely reliable, but maybe a little slow), or (2) do a version check and fetch if the version has changed. But things can change other than the version (e.g. change of string files). Could also consider fetching everything when updating schedules (because a change in strings might affect what the user sees) and version-check-and-fetch-if-changed on upload?
Looks good! Cunning -- I see that it goes back a step in the sequence, so that all the other checks are then completed next time round. Very nice.
If a patient using the app in single user mode registers with a server and the server is then upgraded, upload of tasks will fail. The message they see is "There was a problem sending your completed tasks to the server". In clinician mode, the error log is visible and they will see (for example) "Server version (2.4.15) doesn't match stored version (2.4.14). Please re-fetch server information."
The workaround is to re-register the patient, though they will lose any tasks not yet uploaded.
We could try to fetch the server information before uploading.