diff --git a/app/src/main/java/eu/kanade/domain/manga/interactor/SetMangaViewerFlags.kt b/app/src/main/java/eu/kanade/domain/manga/interactor/SetMangaViewerFlags.kt index a9f743a11..5673cdbc1 100644 --- a/app/src/main/java/eu/kanade/domain/manga/interactor/SetMangaViewerFlags.kt +++ b/app/src/main/java/eu/kanade/domain/manga/interactor/SetMangaViewerFlags.kt @@ -10,19 +10,21 @@ class SetMangaViewerFlags( ) { suspend fun awaitSetMangaReadingMode(id: Long, flag: Long) { + val manga = mangaRepository.getMangaById(id) mangaRepository.update( MangaUpdate( id = id, - viewerFlags = flag.setFlag(flag, ReadingModeType.MASK.toLong()), + viewerFlags = manga.viewerFlags.setFlag(flag, ReadingModeType.MASK.toLong()), ), ) } suspend fun awaitSetOrientationType(id: Long, flag: Long) { + val manga = mangaRepository.getMangaById(id) mangaRepository.update( MangaUpdate( id = id, - viewerFlags = flag.setFlag(flag, OrientationType.MASK.toLong()), + viewerFlags = manga.viewerFlags.setFlag(flag, OrientationType.MASK.toLong()), ), ) }