From f9baff0e90afe4b3f52ebe5da9aa4474d3d2f1c8 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 13 Jun 2020 17:15:22 -0400 Subject: [PATCH] Show "Start" in chapters FAB if nothing is read yet --- .../kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt | 5 +++++ app/src/main/res/layout/chapters_controller.xml | 2 +- app/src/main/res/values/strings.xml | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt index 89e41b8a12..920b0ba931 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt @@ -284,6 +284,11 @@ class ChaptersController : } actionMode?.invalidate() } + + val context = view?.context + if (context != null && chapters.any { it.read }) { + binding.fab.text = context.getString(R.string.action_resume) + } } private fun fetchChaptersFromSource(manualFetch: Boolean = false) { diff --git a/app/src/main/res/layout/chapters_controller.xml b/app/src/main/res/layout/chapters_controller.xml index fff20a791d..6b3c1eed6a 100644 --- a/app/src/main/res/layout/chapters_controller.xml +++ b/app/src/main/res/layout/chapters_controller.xml @@ -53,7 +53,7 @@ diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 21ae2caf6f..f2b622f6d8 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -76,6 +76,7 @@ Next chapter Retry Remove + Start Resume Move Open in browser