Use kotlin.time extensions in some more places

This commit is contained in:
arkon
2022-10-22 19:57:55 -04:00
parent 39e41510d0
commit 5c868d7846
8 changed files with 20 additions and 12 deletions

View File

@@ -48,6 +48,7 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.launch
import java.util.Date
import kotlin.time.Duration.Companion.seconds
@Composable
fun UpdateScreen(
@@ -135,7 +136,7 @@ private fun UpdateScreenContent(
scope.launch {
// Fake refresh status but hide it after a second as it's a long running task
isRefreshing = true
delay(1000)
delay(1.seconds)
isRefreshing = false
}
},