mirror of
https://github.com/android-password-store/Android-Password-Store
synced 2025-08-30 13:57:47 +00:00
@@ -15,6 +15,7 @@ import dagger.assisted.AssistedFactory
|
||||
import dagger.assisted.AssistedInject
|
||||
import kotlin.collections.set
|
||||
import kotlin.coroutines.coroutineContext
|
||||
import kotlin.time.Duration.Companion.milliseconds
|
||||
import kotlin.time.Duration.Companion.seconds
|
||||
import kotlin.time.ExperimentalTime
|
||||
import kotlinx.coroutines.awaitCancellation
|
||||
@@ -63,7 +64,7 @@ constructor(
|
||||
do {
|
||||
val otp = calculateTotp()
|
||||
emit(otp)
|
||||
delay(ONE_SECOND.seconds)
|
||||
delay(ONE_SECOND.milliseconds)
|
||||
} while (coroutineContext.isActive)
|
||||
} else {
|
||||
awaitCancellation()
|
||||
|
Reference in New Issue
Block a user