Clean up preference extensions/items a bit
This commit is contained in:
@@ -4,7 +4,6 @@ import cafe.adriel.voyager.core.model.ScreenModel
|
||||
import cafe.adriel.voyager.core.model.coroutineScope
|
||||
import eu.kanade.domain.base.BasePreferences
|
||||
import eu.kanade.tachiyomi.data.track.TrackManager
|
||||
import eu.kanade.tachiyomi.util.preference.toggle
|
||||
import tachiyomi.core.preference.Preference
|
||||
import tachiyomi.core.preference.TriState
|
||||
import tachiyomi.core.preference.getAndSet
|
||||
@@ -29,10 +28,6 @@ class LibrarySettingsScreenModel(
|
||||
val trackServices
|
||||
get() = trackManager.services.filter { it.isLogged }
|
||||
|
||||
fun togglePreference(preference: (LibraryPreferences) -> Preference<Boolean>) {
|
||||
preference(libraryPreferences).toggle()
|
||||
}
|
||||
|
||||
fun toggleFilter(preference: (LibraryPreferences) -> Preference<TriState>) {
|
||||
preference(libraryPreferences).getAndSet {
|
||||
it.next()
|
||||
|
||||
Reference in New Issue
Block a user