Skip to content
Snippets Groups Projects
Unverified Commit 0d5657ed authored by Mohamed's avatar Mohamed Committed by GitHub
Browse files

Move hiding the dialog before nav events (#2508)

parent c2b94147
No related branches found
Tags v1.14.0-RC5
No related merge requests found
......@@ -42,43 +42,41 @@ class SubmissionTestResultAvailableViewModel @AssistedInject constructor(
override fun onTEKAvailable(teks: List<TemporaryExposureKey>) {
Timber.d("onTEKAvailable(teks.size=%d)", teks.size)
autoSubmission.updateMode(AutoSubmission.Mode.MONITOR)
showKeysRetrievalProgress.postValue(false)
routeToScreen.postValue(
SubmissionTestResultAvailableFragmentDirections
.actionSubmissionTestResultAvailableFragmentToSubmissionTestResultConsentGivenFragment()
)
showKeysRetrievalProgress.postValue(false)
}
override fun onTEKPermissionDeclined() {
Timber.d("onTEKPermissionDeclined")
showKeysRetrievalProgress.postValue(false)
routeToScreen.postValue(
SubmissionTestResultAvailableFragmentDirections
.actionSubmissionTestResultAvailableFragmentToSubmissionTestResultNoConsentFragment()
)
showKeysRetrievalProgress.postValue(false)
}
override fun onTracingConsentRequired(onConsentResult: (given: Boolean) -> Unit) {
Timber.d("onTracingConsentRequired")
showTracingConsentDialog.postValue(onConsentResult)
showKeysRetrievalProgress.postValue(false)
showTracingConsentDialog.postValue(onConsentResult)
}
override fun onPermissionRequired(permissionRequest: (Activity) -> Unit) {
Timber.d("onPermissionRequired")
showPermissionRequest.postValue(permissionRequest)
showKeysRetrievalProgress.postValue(false)
showPermissionRequest.postValue(permissionRequest)
}
override fun onError(error: Throwable) {
Timber.e(error, "Failed to update TEKs.")
showKeysRetrievalProgress.postValue(false)
error.report(
exceptionCategory = ExceptionCategory.EXPOSURENOTIFICATION,
prefix = "SubmissionTestResultAvailableViewModel"
)
showKeysRetrievalProgress.postValue(false)
}
}
)
......
......@@ -100,8 +100,8 @@ class SubmissionResultPositiveOtherWarningNoConsentViewModel @AssistedInject con
tekHistoryUpdater.updateTEKHistoryOrRequestPermission()
} else {
Timber.d("showEnableTracingEvent:Unit")
showEnableTracingEvent.postValue(Unit)
showKeysRetrievalProgress.postValue(false)
showEnableTracingEvent.postValue(Unit)
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment