mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Use Kotlin Duration.
This commit is contained in:
+2
-1
@@ -26,6 +26,7 @@ import kotlinx.coroutines.Job
|
|||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
import kotlin.time.Duration.Companion.seconds
|
||||||
|
|
||||||
private val tag = LoggerTag("ShowQrCodePresenter", LoggerTags.linkNewDevice)
|
private val tag = LoggerTag("ShowQrCodePresenter", LoggerTags.linkNewDevice)
|
||||||
|
|
||||||
@@ -63,7 +64,7 @@ class ShowQrCodePresenter(
|
|||||||
linkNewMobileHandler.rotateQrCode()
|
linkNewMobileHandler.rotateQrCode()
|
||||||
// Ensure that outdated data is not rendered too long while rotating QR code
|
// Ensure that outdated data is not rendered too long while rotating QR code
|
||||||
loadingJob = launch {
|
loadingJob = launch {
|
||||||
delay(1000)
|
delay(1.seconds)
|
||||||
value = ShowQrCodeState(
|
value = ShowQrCodeState(
|
||||||
data = AsyncData.Loading(),
|
data = AsyncData.Loading(),
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user