mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 08:08:55 +01:00 
			
		
		
		
	Fix SetMangaViewerFlags (#8719)
Stop clearing old viewer flags when setting a flag
This commit is contained in:
		@@ -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()),
 | 
			
		||||
            ),
 | 
			
		||||
        )
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user