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

Fixing issue with Observation Syncing Save Button not showing up. #649

Merged
merged 1 commit into from
Jun 29, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,12 @@ class BrapiSyncObsDialog(context: Context) : Dialog(context) ,android.view.View.
// println("Value: " + obs.value)
// }
println("Size of ObsList: ${studyObservations.observationList.size}")
println("Done pulling observations. Page: ${paginationManager.page}/${paginationManager.totalPages}")
//Adding 1 to the page number here so it makes more sense when debugging. Otherwise we get 0/10 as the first and 9/10 as the last message.
println("Done pulling observations. Page: ${paginationManager.page + 1}/${paginationManager.totalPages}")

//Once we have loaded in all the observations, we can make the save button visible
if (paginationManager.page == paginationManager.totalPages) {
// We need to check page == totalPages - 1 otherwise it will loop indefinitely as the 0-based page will never reach totalPages(1based)
if (paginationManager.page == paginationManager.totalPages - 1) {
makeSaveBtnVisible()
}
}
Expand Down
Loading