From aa50554f06f3e6cfbd5ac41a296fe2ad790f5352 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 30 May 2021 10:29:32 -0400 Subject: [PATCH] Fix last library category not being saved --- .../eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt | 2 -- .../java/eu/kanade/tachiyomi/ui/library/LibraryController.kt | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index 479597cec..2f745202e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -83,8 +83,6 @@ class PreferencesHelper(val context: Context) { fun showLibraryUpdateErrors() = prefs.getBoolean(Keys.showLibraryUpdateErrors, false) - fun clear() = prefs.edit { clear() } - fun themeMode() = flowPrefs.getEnum(Keys.themeMode, Values.ThemeMode.system) fun themeLight() = flowPrefs.getEnum(Keys.themeLight, Values.LightThemeVariant.default) 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 18023a235..ab10a666a 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 @@ -177,6 +177,7 @@ class LibraryController( adapter = LibraryAdapter(this) binding.libraryPager.adapter = adapter binding.libraryPager.pageSelections() + .drop(1) .onEach { preferences.lastUsedCategory().set(it) activeCategory = it