aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--dependency-sync/build.gradle.kts6
-rw-r--r--gradle/libs.versions.toml2
4 files changed, 14 insertions, 10 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()
}
}
}
diff --git a/dependency-sync/build.gradle.kts b/dependency-sync/build.gradle.kts
index d5d0307b..308b8b57 100644
--- a/dependency-sync/build.gradle.kts
+++ b/dependency-sync/build.gradle.kts
@@ -18,8 +18,8 @@ dependencies {
dependencySync("org.jetbrains.kotlinx:kover:0.4.4")
// Kotlin dependencies
- dependencySync("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0-RC")
- dependencySync("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0-RC")
+ dependencySync("org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0-RC2")
+ dependencySync("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0-RC2")
// AndroidX dependencies
dependencySync("androidx.activity:activity-ktx:1.4.0")
@@ -97,5 +97,5 @@ dependencies {
dependencySync("com.github.android-password-store:shared-preferences-fake:2.0.0")
dependencySync("androidx.test:rules:1.4.1-alpha03")
dependencySync("androidx.test:runner:1.4.1-alpha03")
- dependencySync("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.0-RC")
+ dependencySync("org.jetbrains.kotlinx:kotlinx-coroutines-test:1.6.0-RC2")
}
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 347bf55e..59a80c93 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -4,7 +4,7 @@ androidx_activity = "1.4.0"
androidx_test = "1.4.1-alpha03"
compose = "1.1.0-beta04"
composeSnapshot = "-"
-coroutines = "1.6.0-RC"
+coroutines = "1.6.0-RC2"
flowbinding = "1.2.0"
hilt = "2.40.5"
kotlin = "1.6.0"