From ebd4323df23293524eec2b2a1509eb4cd8cde4b3 Mon Sep 17 00:00:00 2001 From: Ricki Hirner Date: Sat, 6 Apr 2024 20:52:18 +0200 Subject: [PATCH] Remove unnecessary viewModelScope.launch --- .../java/at/bitfire/cert4android/TrustCertificateActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/src/main/java/at/bitfire/cert4android/TrustCertificateActivity.kt b/lib/src/main/java/at/bitfire/cert4android/TrustCertificateActivity.kt index 9a61205..e15d69b 100644 --- a/lib/src/main/java/at/bitfire/cert4android/TrustCertificateActivity.kt +++ b/lib/src/main/java/at/bitfire/cert4android/TrustCertificateActivity.kt @@ -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(), @@ -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)