mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 20:31:02 -05:00
Remove unnecessary DB calls when setting chapter flag defaults
This commit is contained in:
parent
52416ff3a8
commit
8931dbb657
1 changed files with 2 additions and 8 deletions
|
@ -14,12 +14,8 @@ object ChapterSettingsHelper {
|
||||||
/**
|
/**
|
||||||
* Updates the global Chapter Settings in Preferences.
|
* Updates the global Chapter Settings in Preferences.
|
||||||
*/
|
*/
|
||||||
fun setGlobalSettings(manga: Manga?) {
|
fun setGlobalSettings(manga: Manga) {
|
||||||
manga?.let {
|
prefs.setChapterSettingsDefault(manga)
|
||||||
prefs.setChapterSettingsDefault(it)
|
|
||||||
db.updateChapterFlags(it).executeAsBlocking()
|
|
||||||
db.updateViewerFlags(it).executeAsBlocking()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -36,7 +32,6 @@ object ChapterSettingsHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
db.updateChapterFlags(manga).executeAsBlocking()
|
db.updateChapterFlags(manga).executeAsBlocking()
|
||||||
db.updateViewerFlags(manga).executeAsBlocking()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +54,6 @@ object ChapterSettingsHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
db.updateChapterFlags(updatedMangas).executeAsBlocking()
|
db.updateChapterFlags(updatedMangas).executeAsBlocking()
|
||||||
db.updateViewerFlags(updatedMangas).executeAsBlocking()
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue