Fixed unread badge type issues

This commit is contained in:
Jay 2020-04-13 22:42:41 -04:00
parent fb7599c833
commit bdf73da0ba

View file

@ -87,7 +87,10 @@ class LibraryPresenter(
totalChapters = null totalChapters = null
val mangaMap = withContext(Dispatchers.IO) { val mangaMap = withContext(Dispatchers.IO) {
val library = getLibraryFromDB() val library = getLibraryFromDB()
library.apply { setDownloadCount(library) } library.apply {
setDownloadCount(library)
setUnreadBadge(library)
}
allLibraryItems = library allLibraryItems = library
var mangaMap = library var mangaMap = library
mangaMap = applyFilters(mangaMap) mangaMap = applyFilters(mangaMap)
@ -477,7 +480,7 @@ class LibraryPresenter(
launchUI { launchUI {
val mangaMap = allLibraryItems val mangaMap = allLibraryItems
withContext(Dispatchers.IO) { setUnreadBadge(mangaMap) } withContext(Dispatchers.IO) { setUnreadBadge(mangaMap) }
libraryItems = mangaMap allLibraryItems = mangaMap
val current = libraryItems val current = libraryItems
withContext(Dispatchers.IO) { setUnreadBadge(current) } withContext(Dispatchers.IO) { setUnreadBadge(current) }
libraryItems = current libraryItems = current