mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-16 14:07:28 +01:00
Add manga-wised rotation mode settings (#4841)
* Add manga-wised rotation mode settings Based on #3522 Co-authored-by: bboyz269 <4453811+bboyz269@users.noreply.github.com> * Fix small mistakes * Complete TODOs * Rename functions rotation -> orientation * Fix orientation icon not changing Bug from video * Fix bug with force portrait not being force if a default value Bug from video * Backup viewer_flag as a seperate field in so legacy/forks doesn't crash * Make viewer_flags nullable so old backups viewer gets restored * Add migration for old rotation and viewer to new defaults ones * Rename variable in enums * Fix migration after OrientationType was changed * Remove untrue comment Co-authored-by: bboyz269 <4453811+bboyz269@users.noreply.github.com>
This commit is contained in:
@@ -17,7 +17,8 @@ object ChapterSettingsHelper {
|
||||
fun setGlobalSettings(manga: Manga?) {
|
||||
manga?.let {
|
||||
prefs.setChapterSettingsDefault(it)
|
||||
db.updateFlags(it).executeAsBlocking()
|
||||
db.updateChapterFlags(it).executeAsBlocking()
|
||||
db.updateViewerFlags(it).executeAsBlocking()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +35,8 @@ object ChapterSettingsHelper {
|
||||
setChapterOrder(prefs.sortChapterByAscendingOrDescending())
|
||||
}
|
||||
|
||||
db.updateFlags(manga).executeAsBlocking()
|
||||
db.updateChapterFlags(manga).executeAsBlocking()
|
||||
db.updateViewerFlags(manga).executeAsBlocking()
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -54,7 +56,8 @@ object ChapterSettingsHelper {
|
||||
manga
|
||||
}
|
||||
|
||||
db.updateFlags(updatedMangas).executeAsBlocking()
|
||||
db.updateChapterFlags(updatedMangas).executeAsBlocking()
|
||||
db.updateViewerFlags(updatedMangas).executeAsBlocking()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user