From e5ea1e0787a43986e8174b48e535a0284f75b23a Mon Sep 17 00:00:00 2001 From: Quickdesh Date: Sat, 10 Feb 2024 15:27:14 -0500 Subject: [PATCH] fix(chapters): fixed crashing when seeking below 0 seconds --- .../tachiyomi/ui/player/viewer/components/CurrentChapter.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/player/viewer/components/CurrentChapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/player/viewer/components/CurrentChapter.kt index 934a53e3a..0d2c0b464 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/player/viewer/components/CurrentChapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/player/viewer/components/CurrentChapter.kt @@ -55,7 +55,7 @@ class CurrentChapter( if (this.chapters.isEmpty()) { return } - val chapter = this.chapters.last { it.time <= (value ?: 0F) } + val chapter = this.chapters.last { it.time <= (value ?: 0F).coerceAtLeast(0F) } view.setComposeContent { CurrentChapterComposable( chapter = chapter,