-
Notifications
You must be signed in to change notification settings - Fork 1
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
[Quest/Malawi Core] Android App : Sync Inactive recently changed Resources which are being filtered #74
Conversation
…urces which are being filtered
@BuchiNy can redo the tests you did on syncing inactive resources on this branch, especially with patients |
sharedPreferencesHelper | ||
.read(SharedPreferenceKey.LAST_SYNC_TIMESTAMP.name, null) | ||
.isNullOrBlank() | ||
.not() |
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.
Is initial sync is when the timestamp is null
fhircore/android/engine/src/main/java/org/smartregister/fhircore/engine/sync/SyncBroadcaster.kt
Lines 112 to 113 in b5b91af
fun isInitialSync() = | |
sharedPreferencesHelper.read(SharedPreferenceKey.LAST_SYNC_TIMESTAMP.name, null).isNullOrBlank() |
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.
I don't understand what this means
Is initial sync is when the timestamp is null
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.
The timestamp is set after the initial sync, so if you want to check if a sync is an initial sync you have to check if the timestamp is null. On that line, you are negating which means this is more of a check if the sync is subsequent than the initial one. Check the implementation in SyncBroadcaster.kt
Fixes #73
Engineer Checklist
./gradlew spotlessApply
and./gradlew spotlessCheck
to check my code follows the project's style guide