parent
6b9180844d
commit
c8316c7254
@ -1,40 +0,0 @@
|
||||
package eu.kanade.tachiyomi.ui.setting
|
||||
|
||||
import androidx.preference.PreferenceScreen
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.util.preference.defaultValue
|
||||
import eu.kanade.tachiyomi.util.preference.entriesRes
|
||||
import eu.kanade.tachiyomi.util.preference.infoPreference
|
||||
import eu.kanade.tachiyomi.util.preference.listPreference
|
||||
import eu.kanade.tachiyomi.util.preference.preferenceCategory
|
||||
import eu.kanade.tachiyomi.util.preference.titleRes
|
||||
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||
import eu.kanade.tachiyomi.data.preference.PreferenceValues as Values
|
||||
|
||||
class SettingsParentalControlsController : SettingsController() {
|
||||
|
||||
override fun setupPreferenceScreen(screen: PreferenceScreen) = screen.apply {
|
||||
titleRes = R.string.pref_category_parental_controls
|
||||
|
||||
listPreference {
|
||||
key = Keys.allowNsfwSource
|
||||
titleRes = R.string.pref_allow_nsfw_sources
|
||||
entriesRes = arrayOf(
|
||||
R.string.pref_allow_nsfw_sources_allowed,
|
||||
R.string.pref_allow_nsfw_sources_allowed_multisource,
|
||||
R.string.pref_allow_nsfw_sources_blocked
|
||||
)
|
||||
entryValues = arrayOf(
|
||||
Values.NsfwAllowance.ALLOWED.name,
|
||||
Values.NsfwAllowance.PARTIAL.name,
|
||||
Values.NsfwAllowance.BLOCKED.name
|
||||
)
|
||||
defaultValue = Values.NsfwAllowance.ALLOWED.name
|
||||
summary = "%s"
|
||||
}
|
||||
|
||||
preferenceCategory {
|
||||
infoPreference(R.string.parental_controls_info)
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M16.67,13.13C18.04,14.06 19,15.32 19,17v3h4v-3C23,14.82 19.43,13.53 16.67,13.13z" />
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M15,12c2.21,0 4,-1.79 4,-4c0,-2.21 -1.79,-4 -4,-4c-0.47,0 -0.91,0.1 -1.33,0.24C14.5,5.27 15,6.58 15,8s-0.5,2.73 -1.33,3.76C14.09,11.9 14.53,12 15,12z" />
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M9,12c2.21,0 4,-1.79 4,-4c0,-2.21 -1.79,-4 -4,-4S5,5.79 5,8C5,10.21 6.79,12 9,12zM9,6c1.1,0 2,0.9 2,2c0,1.1 -0.9,2 -2,2S7,9.1 7,8C7,6.9 7.9,6 9,6z" />
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M9,13c-2.67,0 -8,1.34 -8,4v3h16v-3C17,14.34 11.67,13 9,13zM15,18H3l0,-0.99C3.2,16.29 6.3,15 9,15s5.8,1.29 6,2V18z" />
|
||||
</vector>
|
Loading…
Reference in new issue