|
@@ -29,6 +29,7 @@ import androidx.core.graphics.ColorUtils
|
|
import androidx.core.view.WindowCompat
|
|
import androidx.core.view.WindowCompat
|
|
import androidx.core.view.WindowInsetsCompat
|
|
import androidx.core.view.WindowInsetsCompat
|
|
import androidx.core.view.WindowInsetsControllerCompat
|
|
import androidx.core.view.WindowInsetsControllerCompat
|
|
|
|
+import androidx.core.view.isInvisible
|
|
import androidx.core.view.isVisible
|
|
import androidx.core.view.isVisible
|
|
import androidx.lifecycle.lifecycleScope
|
|
import androidx.lifecycle.lifecycleScope
|
|
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
|
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
|
|
@@ -603,6 +604,9 @@ class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>()
|
|
viewer?.setChapters(viewerChapters)
|
|
viewer?.setChapters(viewerChapters)
|
|
binding.toolbar.subtitle = viewerChapters.currChapter.chapter.name
|
|
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 leftChapterObject = if (viewer is R2LPagerViewer) viewerChapters.nextChapter else viewerChapters.prevChapter
|
|
val rightChapterObject = if (viewer is R2LPagerViewer) viewerChapters.prevChapter else viewerChapters.nextChapter
|
|
val rightChapterObject = if (viewer is R2LPagerViewer) viewerChapters.prevChapter else viewerChapters.nextChapter
|
|
|
|
|