|
@@ -224,30 +224,30 @@ class ChaptersPresenter : BasePresenter<ChaptersFragment>() {
|
|
|
|
|
|
fun revertSortOrder() {
|
|
fun revertSortOrder() {
|
|
manga.setChapterOrder(if (sortDescending()) Manga.SORT_ASC else Manga.SORT_DESC)
|
|
manga.setChapterOrder(if (sortDescending()) Manga.SORT_ASC else Manga.SORT_DESC)
|
|
- db.insertManga(manga).executeAsBlocking()
|
|
|
|
|
|
+ db.updateFlags(manga).executeAsBlocking()
|
|
refreshChapters()
|
|
refreshChapters()
|
|
}
|
|
}
|
|
|
|
|
|
fun setReadFilter(onlyUnread: Boolean) {
|
|
fun setReadFilter(onlyUnread: Boolean) {
|
|
manga.readFilter = if (onlyUnread) Manga.SHOW_UNREAD else Manga.SHOW_ALL
|
|
manga.readFilter = if (onlyUnread) Manga.SHOW_UNREAD else Manga.SHOW_ALL
|
|
- db.insertManga(manga).executeAsBlocking()
|
|
|
|
|
|
+ db.updateFlags(manga).executeAsBlocking()
|
|
refreshChapters()
|
|
refreshChapters()
|
|
}
|
|
}
|
|
|
|
|
|
fun setDownloadedFilter(onlyDownloaded: Boolean) {
|
|
fun setDownloadedFilter(onlyDownloaded: Boolean) {
|
|
manga.downloadedFilter = if (onlyDownloaded) Manga.SHOW_DOWNLOADED else Manga.SHOW_ALL
|
|
manga.downloadedFilter = if (onlyDownloaded) Manga.SHOW_DOWNLOADED else Manga.SHOW_ALL
|
|
- db.insertManga(manga).executeAsBlocking()
|
|
|
|
|
|
+ db.updateFlags(manga).executeAsBlocking()
|
|
refreshChapters()
|
|
refreshChapters()
|
|
}
|
|
}
|
|
|
|
|
|
fun setDisplayMode(mode: Int) {
|
|
fun setDisplayMode(mode: Int) {
|
|
manga.displayMode = mode
|
|
manga.displayMode = mode
|
|
- db.insertManga(manga).executeAsBlocking()
|
|
|
|
|
|
+ db.updateFlags(manga).executeAsBlocking()
|
|
}
|
|
}
|
|
|
|
|
|
fun setSorting(mode: Int) {
|
|
fun setSorting(mode: Int) {
|
|
manga.sorting = mode
|
|
manga.sorting = mode
|
|
- db.insertManga(manga).executeAsBlocking()
|
|
|
|
|
|
+ db.updateFlags(manga).executeAsBlocking()
|
|
refreshChapters()
|
|
refreshChapters()
|
|
}
|
|
}
|
|
|
|
|