Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Submission result request handling fix (EXPOSUREAPP-3001) #1291

Merged
merged 2 commits into from
Oct 2, 2020
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
@@ -124,12 +124,21 @@ class SubmissionViewModel : ViewModel() {
}
}

fun refreshDeviceUIState(refreshTestResult: Boolean = true) =
fun refreshDeviceUIState(refreshTestResult: Boolean = true) {
var refresh = refreshTestResult

deviceUiState.value?.let {
if (it != DeviceUIState.PAIRED_NO_RESULT && it != DeviceUIState.UNPAIRED) {
refresh = false
Timber.d("refreshDeviceUIState: Change refresh, state ${it.name} doesn't require refresh")
}
}
executeRequestWithState(
{ SubmissionRepository.refreshUIState(refreshTestResult) },
{ SubmissionRepository.refreshUIState(refresh) },
_uiStateState,
_uiStateError
)
}

fun validateAndStoreTestGUID(rawResult: String) {
val scanResult = QRScanResult(rawResult)