yokai/app/src/main/java/yokai/domain/library/LibraryPreferences.kt
Ahmad Ansori Palembani 850151720b
Some checks are pending
Build app / Build app (push) Waiting to run
Mirror Repository / mirror (push) Waiting to run
feat: Mark duplicate read chapters as read
This also refactor how chapters progress are saved. Chapters' progress now save when user "flipped" the page.

Closes GH-409

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
2025-05-27 21:47:41 +07:00

14 lines
533 B
Kotlin

package yokai.domain.library
import eu.kanade.tachiyomi.core.preference.PreferenceStore
class LibraryPreferences(private val preferenceStore: PreferenceStore) {
fun randomSortSeed() = preferenceStore.getInt("library_random_sort_seed", 0)
fun markDuplicateReadChapterAsRead() = preferenceStore.getStringSet("mark_duplicate_read_chapter_read", emptySet())
companion object {
const val MARK_DUPLICATE_READ_CHAPTER_READ_NEW = "new"
const val MARK_DUPLICATE_READ_CHAPTER_READ_EXISTING = "existing"
}
}