summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-12-10 17:54:45 +0000
committerGitHub <noreply@github.com>2021-12-10 17:54:45 +0000
commitb59c4f068cd9f4791a78d94c3c75f7484423f977 (patch)
treef85d89856ca5d2dedce7a5b7be3738115d27edd9 /app/src
parent8db0b67ce9ba4a5e56c04c1bea3a738eacb176cf (diff)
build(deps): bump kotlinx-coroutines-test from 1.6.0-RC to 1.6.0-RC2 (#1586)
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivity.kt8
-rw-r--r--app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt8
2 files changed, 10 insertions, 6 deletions
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivity.kt b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivity.kt
index b5f33012..1fd4ee60 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivity.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivity.kt
@@ -31,6 +31,7 @@ import kotlin.time.ExperimentalTime
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.collect
+import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import logcat.LogPriority.ERROR
@@ -209,9 +210,10 @@ class DecryptActivity : BasePgpActivity(), OpenPgpServiceConnection.OnBound {
if (entry.hasTotp()) {
lifecycleScope.launch {
- entry.totp.collect { code ->
- withContext(Dispatchers.Main) { adapter.updateOTPCode(code) }
- }
+ entry
+ .totp
+ .onEach { code -> withContext(Dispatchers.Main) { adapter.updateOTPCode(code) } }
+ .collect()
}
}
}
diff --git a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt
index 40a721af..d7d376cc 100644
--- a/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt
+++ b/app/src/main/java/dev/msfjarvis/aps/ui/crypto/DecryptActivityV2.kt
@@ -28,6 +28,7 @@ import kotlin.time.ExperimentalTime
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.collect
+import kotlinx.coroutines.flow.onEach
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
@@ -169,9 +170,10 @@ class DecryptActivityV2 : BasePgpActivity() {
if (entry.hasTotp()) {
lifecycleScope.launch {
- entry.totp.collect { code ->
- withContext(Dispatchers.Main) { adapter.updateOTPCode(code) }
- }
+ entry
+ .totp
+ .onEach { code -> withContext(Dispatchers.Main) { adapter.updateOTPCode(code) } }
+ .collect()
}
}
}