mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-11 18:36:16 +00:00
remove less-used preferences
This commit is contained in:
@@ -24,8 +24,6 @@ object PrefManager {
|
||||
|
||||
fun init(context: Context) { //must be called in Application class or will crash
|
||||
generalPreferences = context.getSharedPreferences(Location.General.location, Context.MODE_PRIVATE)
|
||||
animePreferences = context.getSharedPreferences(Location.Anime.location, Context.MODE_PRIVATE)
|
||||
mangaPreferences = context.getSharedPreferences(Location.Manga.location, Context.MODE_PRIVATE)
|
||||
playerPreferences = context.getSharedPreferences(Location.Player.location, Context.MODE_PRIVATE)
|
||||
readerPreferences = context.getSharedPreferences(Location.Reader.location, Context.MODE_PRIVATE)
|
||||
irrelevantPreferences = context.getSharedPreferences(Location.Irrelevant.location, Context.MODE_PRIVATE)
|
||||
@@ -291,8 +289,6 @@ object PrefManager {
|
||||
return when (prefLoc) {
|
||||
Location.General -> generalPreferences
|
||||
Location.UI -> generalPreferences
|
||||
Location.Anime -> animePreferences
|
||||
Location.Manga -> mangaPreferences
|
||||
Location.Player -> playerPreferences
|
||||
Location.Reader -> readerPreferences
|
||||
Location.NovelReader -> readerPreferences
|
||||
|
||||
@@ -21,6 +21,10 @@ enum class PrefName(val data: Pref) { //TODO: Split this into multiple files
|
||||
VerboseLogging(Pref(Location.General, Boolean::class, false)),
|
||||
DohProvider(Pref(Location.General, Int::class, 0)),
|
||||
DefaultUserAgent(Pref(Location.General, String::class, "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:110.0) Gecko/20100101 Firefox/110.0")),
|
||||
PinnedAnimeSources(Pref(Location.General, Set::class, setOf<String>())),
|
||||
AnimeSearchHistory(Pref(Location.General, Set::class, setOf<String>())),
|
||||
PinnedMangaSources(Pref(Location.General, Set::class, setOf<String>())),
|
||||
MangaSearchHistory(Pref(Location.General, Set::class, setOf<String>())),
|
||||
|
||||
//User Interface
|
||||
UseOLED(Pref(Location.UI, Boolean::class, false)),
|
||||
@@ -42,18 +46,10 @@ enum class PrefName(val data: Pref) { //TODO: Split this into multiple files
|
||||
LayoutAnimations(Pref(Location.UI, Boolean::class, true)),
|
||||
AnimationSpeed(Pref(Location.UI, Float::class, 1f)),
|
||||
ListGrid(Pref(Location.UI, Boolean::class, true)),
|
||||
|
||||
//Anime
|
||||
AnimeListSortOrder(Pref(Location.Anime, String::class, "score")),
|
||||
PinnedAnimeSources(Pref(Location.Anime, Set::class, setOf<String>())),
|
||||
PopularAnimeList(Pref(Location.Anime, Boolean::class, true)),
|
||||
AnimeSearchHistory(Pref(Location.Anime, Set::class, setOf<String>())),
|
||||
|
||||
//Manga
|
||||
MangaListSortOrder(Pref(Location.Manga, String::class, "score")),
|
||||
PinnedMangaSources(Pref(Location.Manga, Set::class, setOf<String>())),
|
||||
PopularMangaList(Pref(Location.Manga, Boolean::class, true)),
|
||||
MangaSearchHistory(Pref(Location.Manga, Set::class, setOf<String>())),
|
||||
PopularMangaList(Pref(Location.UI, Boolean::class, true)),
|
||||
PopularAnimeList(Pref(Location.UI, Boolean::class, true)),
|
||||
AnimeListSortOrder(Pref(Location.UI, String::class, "score")),
|
||||
MangaListSortOrder(Pref(Location.UI, String::class, "score")),
|
||||
|
||||
//Player
|
||||
DefaultSpeed(Pref(Location.Player, Int::class, 5)),
|
||||
|
||||
@@ -11,8 +11,6 @@ data class Pref(
|
||||
enum class Location(val location: String, val exportable: Boolean) {
|
||||
General("ani.dantotsu.general", true),
|
||||
UI("ani.dantotsu.ui", true),
|
||||
Anime("ani.dantotsu.anime", true),
|
||||
Manga("ani.dantotsu.manga", true),
|
||||
Player("ani.dantotsu.player", true),
|
||||
Reader("ani.dantotsu.reader", true),
|
||||
NovelReader("ani.dantotsu.novelReader", true),
|
||||
|
||||
Reference in New Issue
Block a user