From dd1b5c7ea763f26db1b1c4f2918d05118935a4b8 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 10 May 2020 12:58:13 -0400 Subject: [PATCH] Minor edits --- .../ui/browse/source/browse/BrowseSourceController.kt | 4 ++-- .../eu/kanade/tachiyomi/ui/category/CategoryController.kt | 4 ++-- .../eu/kanade/tachiyomi/ui/download/DownloadController.kt | 4 ++-- .../eu/kanade/tachiyomi/ui/library/LibraryController.kt | 4 ++-- .../main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt | 6 +++--- .../kanade/tachiyomi/ui/manga/chapter/ChaptersController.kt | 6 +++--- .../kanade/tachiyomi/ui/recent/updates/UpdatesController.kt | 4 ++-- app/src/main/res/values/strings.xml | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt index 73ec958de..001471920 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt @@ -31,7 +31,7 @@ import eu.kanade.tachiyomi.source.online.HttpSource import eu.kanade.tachiyomi.ui.base.controller.NucleusController import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction import eu.kanade.tachiyomi.ui.library.ChangeMangaCategoriesDialog -import eu.kanade.tachiyomi.ui.main.offsetFabAppbarHeight +import eu.kanade.tachiyomi.ui.main.offsetAppbarHeight import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.ui.webview.WebViewActivity import eu.kanade.tachiyomi.util.system.connectivityManager @@ -159,7 +159,7 @@ open class BrowseSourceController(bundle: Bundle) : binding.fabFilter.setOnClickListener { filterSheet?.show() } - binding.fabFilter.offsetFabAppbarHeight(activity!!) + binding.fabFilter.offsetAppbarHeight(activity!!) binding.fabFilter.visible() } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt index 5db3fc623..4ed9d86a3 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/category/CategoryController.kt @@ -17,7 +17,7 @@ import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.database.models.Category import eu.kanade.tachiyomi.databinding.CategoriesControllerBinding import eu.kanade.tachiyomi.ui.base.controller.NucleusController -import eu.kanade.tachiyomi.ui.main.offsetFabAppbarHeight +import eu.kanade.tachiyomi.ui.main.offsetAppbarHeight import eu.kanade.tachiyomi.util.system.toast import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach @@ -95,7 +95,7 @@ class CategoryController : } .launchIn(scope) - binding.fab.offsetFabAppbarHeight(activity!!) + binding.fab.offsetAppbarHeight(activity!!) } /** diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt index af7dba3cf..cbbd91c98 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/download/DownloadController.kt @@ -13,7 +13,7 @@ import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.databinding.DownloadControllerBinding import eu.kanade.tachiyomi.source.model.Page import eu.kanade.tachiyomi.ui.base.controller.NucleusController -import eu.kanade.tachiyomi.ui.main.offsetFabAppbarHeight +import eu.kanade.tachiyomi.ui.main.offsetAppbarHeight import java.util.HashMap import java.util.concurrent.TimeUnit import kotlinx.coroutines.flow.launchIn @@ -93,7 +93,7 @@ class DownloadController : } .launchIn(scope) - binding.fab.offsetFabAppbarHeight(activity!!) + binding.fab.offsetAppbarHeight(activity!!) // Subscribe to changes DownloadService.runningRelay diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index 264626f0a..333b16480 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -32,7 +32,7 @@ import eu.kanade.tachiyomi.ui.base.controller.RootController import eu.kanade.tachiyomi.ui.base.controller.TabbedController import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction import eu.kanade.tachiyomi.ui.main.MainActivity -import eu.kanade.tachiyomi.ui.main.offsetFabAppbarHeight +import eu.kanade.tachiyomi.ui.main.offsetAppbarHeight import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.util.system.getResourceColor import eu.kanade.tachiyomi.util.system.toast @@ -180,7 +180,7 @@ class LibraryController( binding.downloadedOnly.visible() } - binding.actionToolbar.offsetFabAppbarHeight(activity!!) + binding.actionToolbar.offsetAppbarHeight(activity!!) } override fun onChangeStarted(handler: ControllerChangeHandler, type: ControllerChangeType) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt index 2e069de7b..f2d23feb4 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt @@ -383,10 +383,10 @@ class MainActivity : BaseActivity() { } /** - * Used to manually offset a FAB within child views that might be cut off due to the collapsing - * AppBarLayout. + * Used to manually offset a view within the activity's child views that might be cut off due to the + * collapsing AppBarLayout. */ -fun View.offsetFabAppbarHeight(activity: Activity) { +fun View.offsetAppbarHeight(activity: Activity) { val appbar: AppBarLayout = activity.findViewById(R.id.appbar) val tabs: TabLayout = activity.findViewById(R.id.tabs) appbar.addOnOffsetChangedListener( 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 3e0107903..59e64f695 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 @@ -24,7 +24,7 @@ import eu.kanade.tachiyomi.data.database.models.Manga import eu.kanade.tachiyomi.data.download.model.Download import eu.kanade.tachiyomi.databinding.ChaptersControllerBinding import eu.kanade.tachiyomi.ui.base.controller.NucleusController -import eu.kanade.tachiyomi.ui.main.offsetFabAppbarHeight +import eu.kanade.tachiyomi.ui.main.offsetAppbarHeight import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.util.system.getResourceColor @@ -126,8 +126,8 @@ class ChaptersController : binding.fab.shrinkOnScroll(binding.recycler) - binding.actionToolbar.offsetFabAppbarHeight(activity!!) - binding.fab.offsetFabAppbarHeight(activity!!) + binding.actionToolbar.offsetAppbarHeight(activity!!) + binding.fab.offsetAppbarHeight(activity!!) } override fun onDestroyView(view: View) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesController.kt index 20c151e87..c4e7ad350 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/recent/updates/UpdatesController.kt @@ -23,7 +23,7 @@ import eu.kanade.tachiyomi.ui.base.controller.NucleusController import eu.kanade.tachiyomi.ui.base.controller.RootController import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction import eu.kanade.tachiyomi.ui.main.MainActivity -import eu.kanade.tachiyomi.ui.main.offsetFabAppbarHeight +import eu.kanade.tachiyomi.ui.main.offsetAppbarHeight import eu.kanade.tachiyomi.ui.manga.MangaController import eu.kanade.tachiyomi.ui.reader.ReaderActivity import eu.kanade.tachiyomi.util.system.notificationManager @@ -112,7 +112,7 @@ class UpdatesController : } .launchIn(scope) - binding.actionToolbar.offsetFabAppbarHeight(activity!!) + binding.actionToolbar.offsetAppbarHeight(activity!!) } override fun onDestroyView(view: View) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 80dad839f..c86ad4b6d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -321,9 +321,9 @@ Restore backup Restore library from backup file Backup location - Service + Automatic backups Backup frequency - Max automatic backups + Maximum backups Source not found Backup created Restore completed