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

Missing presence tracing (EXPOSUREAPP-14413) #5773

Merged
merged 2 commits into from
Dec 21, 2022
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 @@ -144,18 +144,16 @@ class CheckInsConsentViewModel @AssistedInject constructor(

private fun initialSet(): Set<Long> = savedState.get(SET_KEY) ?: emptySet()

private fun resetPreviousSubmissionConsents() = launch {
try {
Timber.d("Trying to reset submission consents")
checkInRepository.apply {
val ids = completedCheckIns.first().filter { it.hasSubmissionConsent }.map { it.id }
updateSubmissionConsents(ids, consent = false)
}

Timber.d("Resetting submission consents was successful")
} catch (error: Exception) {
Timber.e(error, "Failed to reset SubmissionConsents")
private suspend fun resetPreviousSubmissionConsents() = try {
Timber.d("Trying to reset submission consents")
checkInRepository.apply {
val ids = completedCheckIns.first().filter { it.hasSubmissionConsent }.map { it.id }
updateSubmissionConsents(ids, consent = false)
}

Timber.d("Resetting submission consents was successful")
} catch (error: Exception) {
Timber.e(error, "Failed to reset SubmissionConsents")
}

@AssistedFactory
Expand Down