From 8931dbb657cfd243a48e537b25d2a8b782a6a982 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 11 Jul 2021 15:18:00 -0400 Subject: [PATCH] Remove unnecessary DB calls when setting chapter flag defaults --- .../tachiyomi/util/chapter/ChapterSettingsHelper.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSettingsHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSettingsHelper.kt index cb69d44f8c..b71d745866 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSettingsHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/util/chapter/ChapterSettingsHelper.kt @@ -14,12 +14,8 @@ object ChapterSettingsHelper { /** * Updates the global Chapter Settings in Preferences. */ - fun setGlobalSettings(manga: Manga?) { - manga?.let { - prefs.setChapterSettingsDefault(it) - db.updateChapterFlags(it).executeAsBlocking() - db.updateViewerFlags(it).executeAsBlocking() - } + fun setGlobalSettings(manga: Manga) { + prefs.setChapterSettingsDefault(manga) } /** @@ -36,7 +32,6 @@ object ChapterSettingsHelper { } db.updateChapterFlags(manga).executeAsBlocking() - db.updateViewerFlags(manga).executeAsBlocking() } /** @@ -59,7 +54,6 @@ object ChapterSettingsHelper { } db.updateChapterFlags(updatedMangas).executeAsBlocking() - db.updateViewerFlags(updatedMangas).executeAsBlocking() } } }