feat: adult only media option
This commit is contained in:
parent
c0bccc027f
commit
99b3bbaaad
13 changed files with 137 additions and 135 deletions
|
@ -457,7 +457,9 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
|||
settingsIncludeAnimeList.isChecked = PrefManager.getVal(PrefName.IncludeAnimeList)
|
||||
settingsIncludeAnimeList.setOnCheckedChangeListener { _, isChecked ->
|
||||
PrefManager.setVal(PrefName.IncludeAnimeList, isChecked)
|
||||
restartApp(binding.root)
|
||||
}
|
||||
|
||||
var previousEp: View = when (PrefManager.getVal<Int>(PrefName.AnimeDefaultView)) {
|
||||
0 -> settingsEpList
|
||||
1 -> settingsEpGrid
|
||||
|
@ -548,6 +550,7 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
|||
settingsIncludeMangaList.isChecked = PrefManager.getVal(PrefName.IncludeMangaList)
|
||||
settingsIncludeMangaList.setOnCheckedChangeListener { _, isChecked ->
|
||||
PrefManager.setVal(PrefName.IncludeMangaList, isChecked)
|
||||
restartApp(binding.root)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -721,7 +724,11 @@ class SettingsActivity : AppCompatActivity(), SimpleDialog.OnDialogResultListene
|
|||
settingsRecentlyListOnly.setOnCheckedChangeListener { _, isChecked ->
|
||||
PrefManager.setVal(PrefName.RecentlyListOnly, isChecked)
|
||||
}
|
||||
|
||||
settingsAdultAnimeOnly.isChecked = PrefManager.getVal(PrefName.AdultOnly)
|
||||
settingsAdultAnimeOnly.setOnCheckedChangeListener { _, isChecked ->
|
||||
PrefManager.setVal(PrefName.AdultOnly, isChecked)
|
||||
restartApp(binding.root)
|
||||
}
|
||||
var previousStart: View = when (PrefManager.getVal<Int>(PrefName.DefaultStartUpTab)) {
|
||||
0 -> uiSettingsAnime
|
||||
1 -> uiSettingsHome
|
||||
|
|
|
@ -40,6 +40,9 @@ enum class PrefName(val data: Pref) { //TODO: Split this into multiple files
|
|||
LastAnilistNotificationId(Pref(Location.General, Int::class, 0)),
|
||||
AnilistFilteredTypes(Pref(Location.General, Set::class, setOf<String>())),
|
||||
UseAlarmManager(Pref(Location.General, Boolean::class, false)),
|
||||
IncludeAnimeList(Pref(Location.General, Boolean::class, true)),
|
||||
IncludeMangaList(Pref(Location.General, Boolean::class, true)),
|
||||
AdultOnly(Pref(Location.General, Boolean::class, false)),
|
||||
|
||||
//User Interface
|
||||
UseOLED(Pref(Location.UI, Boolean::class, false)),
|
||||
|
@ -77,8 +80,7 @@ enum class PrefName(val data: Pref) { //TODO: Split this into multiple files
|
|||
MangaListSortOrder(Pref(Location.UI, String::class, "score")),
|
||||
CommentSortOrder(Pref(Location.UI, String::class, "newest")),
|
||||
FollowerLayout(Pref(Location.UI, Int::class, 0)),
|
||||
IncludeAnimeList(Pref(Location.UI, Boolean::class, true)),
|
||||
IncludeMangaList(Pref(Location.UI, Boolean::class, true)),
|
||||
|
||||
|
||||
//Player
|
||||
DefaultSpeed(Pref(Location.Player, Int::class, 5)),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue