mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-21 20:47:03 -05:00
Fix occasional crash when opening library settings sheet
See https://stackoverflow.com/questions/47648689/sealed-classs-objects-mysteriously-becoming-null-when-referenced-by-other-compa
(cherry picked from commit c0e2eb211d
)
This commit is contained in:
parent
6f2bb18d72
commit
4498b10a10
2 changed files with 3 additions and 3 deletions
|
@ -24,7 +24,7 @@ sealed class LibraryDisplayMode(
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val values = setOf(CompactGrid, ComfortableGrid, List, CoverOnlyGrid)
|
val values by lazy { setOf(CompactGrid, ComfortableGrid, List, CoverOnlyGrid) }
|
||||||
val default = CompactGrid
|
val default = CompactGrid
|
||||||
|
|
||||||
fun valueOf(flag: Long?): LibraryDisplayMode {
|
fun valueOf(flag: Long?): LibraryDisplayMode {
|
||||||
|
|
|
@ -65,8 +65,8 @@ data class LibrarySort(
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val types = setOf(Type.Alphabetical, Type.LastRead, Type.LastUpdate, Type.UnreadCount, Type.TotalChapters, Type.LatestChapter, Type.ChapterFetchDate, Type.DateAdded)
|
val types by lazy { setOf(Type.Alphabetical, Type.LastRead, Type.LastUpdate, Type.UnreadCount, Type.TotalChapters, Type.LatestChapter, Type.ChapterFetchDate, Type.DateAdded) }
|
||||||
val directions = setOf(Direction.Ascending, Direction.Descending)
|
val directions by lazy { setOf(Direction.Ascending, Direction.Descending) }
|
||||||
val default = LibrarySort(Type.Alphabetical, Direction.Ascending)
|
val default = LibrarySort(Type.Alphabetical, Direction.Ascending)
|
||||||
|
|
||||||
fun valueOf(flag: Long): LibrarySort {
|
fun valueOf(flag: Long): LibrarySort {
|
Loading…
Reference in a new issue