Skip to content

Commit

Permalink
Remove unnecessary viewModelScope.launch
Browse files Browse the repository at this point in the history
  • Loading branch information
rfc2822 committed Apr 6, 2024
1 parent bc26cae commit ebd4323
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ class TrustCertificateActivity : ComponentActivity() {
} ?: /* use CN if alternative names are not available */ cert.subjectDN.name

val timeFormatter = DateFormat.getDateInstance(DateFormat.LONG)
Snapshot.withMutableSnapshot {
Snapshot.withMutableSnapshot { // thread-safe update of UI state
uiState = uiState.copy(
issuedFor = subject,
issuedBy = cert.issuerDN.toString(),
Expand All @@ -339,7 +339,7 @@ class TrustCertificateActivity : ComponentActivity() {
}
}

fun registerDecision(trusted: Boolean) = viewModelScope.launch {
fun registerDecision(trusted: Boolean) {
// notify user decision registry
cert?.let {
UserDecisionRegistry.getInstance(getApplication()).onUserDecision(it, trusted)
Expand Down

0 comments on commit ebd4323

Please sign in to comment.