From c45408088aceb97ce2376dd29ad0c65fc904b653 Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Mon, 1 Apr 2024 20:14:19 +0200 Subject: [PATCH] refactor: Use the `minutes` helper to create the duration (#581) --- .../pachli/components/conversation/ConversationsFragment.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/app/pachli/components/conversation/ConversationsFragment.kt b/app/src/main/java/app/pachli/components/conversation/ConversationsFragment.kt index 8bc762ae2..8e8fad59b 100644 --- a/app/src/main/java/app/pachli/components/conversation/ConversationsFragment.kt +++ b/app/src/main/java/app/pachli/components/conversation/ConversationsFragment.kt @@ -65,8 +65,7 @@ import com.mikepenz.iconics.utils.colorInt import com.mikepenz.iconics.utils.sizeDp import dagger.hilt.android.AndroidEntryPoint import javax.inject.Inject -import kotlin.time.DurationUnit -import kotlin.time.toDuration +import kotlin.time.Duration.Companion.minutes import kotlinx.coroutines.delay import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.flow.filterNotNull @@ -190,7 +189,7 @@ class ConversationsFragment : adapter.itemCount, listOf(StatusBaseViewHolder.Key.KEY_CREATED), ) - delay(1.toDuration(DurationUnit.MINUTES)) + delay(1.minutes) } } }