Move unread chapters badge setting to General section

This commit is contained in:
arkon
2021-10-30 12:42:59 -04:00
parent 90b312a56e
commit 709de81814
9 changed files with 19 additions and 15 deletions
@@ -291,7 +291,7 @@ class LibraryUpdateService(
val failedUpdates = CopyOnWriteArrayList<Pair<Manga, String?>>()
val hasDownloads = AtomicBoolean(false)
val loggedServices by lazy { trackManager.services.filter { it.isLogged } }
val currentUnreadUpdatesCount = preferences.libraryUnreadUpdatesCount().get()
val currentUnreadUpdatesCount = preferences.unreadUpdatesCount().get()
withIOContext {
mangaToUpdate.groupBy { it.source }
@@ -356,7 +356,7 @@ class LibraryUpdateService(
if (newUpdates.isNotEmpty()) {
notifier.showUpdateNotifications(newUpdates)
val newChapterCount = newUpdates.sumOf { it.second.size }
preferences.libraryUnreadUpdatesCount().set(currentUnreadUpdatesCount + newChapterCount)
preferences.unreadUpdatesCount().set(currentUnreadUpdatesCount + newChapterCount)
if (hasDownloads.get()) {
DownloadService.start(this)
}