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

[Quest/Malawi Core] Android App : Sync Inactive recently changed Resources which are being filtered #74

Conversation

calmwalija
Copy link

@calmwalija calmwalija commented Jul 3, 2024

Fixes #73

Engineer Checklist

  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the project's style guide
  • I have built and run the FHIRCore app to verify my change fixes the issue and/or does not break the app

@calmwalija calmwalija self-assigned this Jul 3, 2024
@calmwalija calmwalija added enhancement New feature or request bug Something isn't working labels Jul 3, 2024
@sevenreup
Copy link

@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()

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

fun isInitialSync() =
sharedPreferencesHelper.read(SharedPreferenceKey.LAST_SYNC_TIMESTAMP.name, null).isNullOrBlank()

Copy link
Author

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

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

@sevenreup sevenreup requested review from sevenreup and BuchiNy July 5, 2024 08:07
@sevenreup sevenreup merged commit 5a96be2 into mwcore-dev Jul 5, 2024
3 checks passed
@sevenreup sevenreup deleted the 73-questmalawi-core-android-app-sync-inactive-recently-changed-resources-which-are-being-filtered branch July 5, 2024 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Quest/Malawi Core] Android App : Sync Inactive recently changed Resources which are being filtered
3 participants