diff --git a/domain/src/main/java/tachiyomi/domain/library/model/LibraryDisplayMode.kt b/domain/src/main/java/tachiyomi/domain/library/model/LibraryDisplayMode.kt index 9cefa81c9..968efb940 100644 --- a/domain/src/main/java/tachiyomi/domain/library/model/LibraryDisplayMode.kt +++ b/domain/src/main/java/tachiyomi/domain/library/model/LibraryDisplayMode.kt @@ -24,7 +24,7 @@ sealed class LibraryDisplayMode( } companion object { - val values = setOf(CompactGrid, ComfortableGrid, List, CoverOnlyGrid) + val values by lazy { setOf(CompactGrid, ComfortableGrid, List, CoverOnlyGrid) } val default = CompactGrid fun valueOf(flag: Long?): LibraryDisplayMode { diff --git a/domain/src/main/java/tachiyomi/domain/library/model/LibrarySort.kt b/domain/src/main/java/tachiyomi/domain/library/model/LibrarySortMode.kt similarity index 93% rename from domain/src/main/java/tachiyomi/domain/library/model/LibrarySort.kt rename to domain/src/main/java/tachiyomi/domain/library/model/LibrarySortMode.kt index db95259e0..fcf67fc81 100644 --- a/domain/src/main/java/tachiyomi/domain/library/model/LibrarySort.kt +++ b/domain/src/main/java/tachiyomi/domain/library/model/LibrarySortMode.kt @@ -65,8 +65,8 @@ data class LibrarySort( } companion object { - val types = 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 types by lazy { setOf(Type.Alphabetical, Type.LastRead, Type.LastUpdate, Type.UnreadCount, Type.TotalChapters, Type.LatestChapter, Type.ChapterFetchDate, Type.DateAdded) } + val directions by lazy { setOf(Direction.Ascending, Direction.Descending) } val default = LibrarySort(Type.Alphabetical, Direction.Ascending) fun valueOf(flag: Long?): LibrarySort {