From 81694493dd817b2c48fbcc06c7ebfff19f029925 Mon Sep 17 00:00:00 2001 From: Antoine Jaury Date: Wed, 8 Jul 2026 17:17:00 +0200 Subject: [PATCH] enhance: add delay to SubtitleList drag behavior for smoother seeking --- .../kotlin/bzh/ajaury/chombev/player/ui/SubtitleList.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/feature/records/src/commonMain/kotlin/bzh/ajaury/chombev/player/ui/SubtitleList.kt b/feature/records/src/commonMain/kotlin/bzh/ajaury/chombev/player/ui/SubtitleList.kt index 5c1fe3a..be11d2e 100644 --- a/feature/records/src/commonMain/kotlin/bzh/ajaury/chombev/player/ui/SubtitleList.kt +++ b/feature/records/src/commonMain/kotlin/bzh/ajaury/chombev/player/ui/SubtitleList.kt @@ -39,6 +39,7 @@ import bzh.ajaury.chombev.core.model.Phrase import bzh.ajaury.chombev.player.ui.components.TranscriptionText import bzh.ajaury.chombev.preferences.model.SubtitlePreferences import bzh.ajaury.chombev.subtitle.model.SubtitleLine +import kotlinx.coroutines.delay import kotlin.math.abs import kotlin.time.Duration.Companion.milliseconds @@ -89,6 +90,8 @@ fun SubtitleList( onSeek(targetIndex) } + // Let some time for the player to seek before releasing + delay(100.milliseconds) isDragging = false } }