From 7fd75b7501391934d0e966cb4357100303f1ae91 Mon Sep 17 00:00:00 2001 From: Hunter Nickel Date: Wed, 14 Jul 2021 15:56:50 -0600 Subject: [PATCH] Hide the reader seekbar for single-page chapters (#5551) --- .../main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt index 74a97dad20..57fb6ce96e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt @@ -29,6 +29,7 @@ import androidx.core.graphics.ColorUtils import androidx.core.view.WindowCompat import androidx.core.view.WindowInsetsCompat import androidx.core.view.WindowInsetsControllerCompat +import androidx.core.view.isInvisible import androidx.core.view.isVisible import androidx.lifecycle.lifecycleScope import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView @@ -603,6 +604,9 @@ class ReaderActivity : BaseRxActivity() viewer?.setChapters(viewerChapters) binding.toolbar.subtitle = viewerChapters.currChapter.chapter.name + val currentChapterPageCount = viewerChapters.currChapter.pages?.size ?: 1 + binding.readerSeekbar.isInvisible = currentChapterPageCount == 1 + val leftChapterObject = if (viewer is R2LPagerViewer) viewerChapters.nextChapter else viewerChapters.prevChapter val rightChapterObject = if (viewer is R2LPagerViewer) viewerChapters.prevChapter else viewerChapters.nextChapter