mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-07 11:17:25 +01:00
Fix issues with NSFW sources setting (#6085)
This commit is contained in:
parent
42026b49bf
commit
f0f3afd5f1
@ -12,6 +12,7 @@ import eu.kanade.tachiyomi.util.preference.requireAuthentication
|
|||||||
import eu.kanade.tachiyomi.util.preference.summaryRes
|
import eu.kanade.tachiyomi.util.preference.summaryRes
|
||||||
import eu.kanade.tachiyomi.util.preference.switchPreference
|
import eu.kanade.tachiyomi.util.preference.switchPreference
|
||||||
import eu.kanade.tachiyomi.util.preference.titleRes
|
import eu.kanade.tachiyomi.util.preference.titleRes
|
||||||
|
import eu.kanade.tachiyomi.util.system.AuthenticatorUtil.isAuthenticationSupported
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||||
|
|
||||||
class SettingsBrowseController : SettingsController() {
|
class SettingsBrowseController : SettingsController() {
|
||||||
@ -54,12 +55,14 @@ class SettingsBrowseController : SettingsController() {
|
|||||||
summaryRes = R.string.requires_app_restart
|
summaryRes = R.string.requires_app_restart
|
||||||
defaultValue = true
|
defaultValue = true
|
||||||
|
|
||||||
|
if (context.isAuthenticationSupported() && activity != null) {
|
||||||
requireAuthentication(
|
requireAuthentication(
|
||||||
activity as? FragmentActivity,
|
activity as? FragmentActivity,
|
||||||
activity!!.getString(R.string.pref_category_nsfw_content),
|
activity!!.getString(R.string.pref_category_nsfw_content),
|
||||||
activity!!.getString(R.string.confirm_lock_change),
|
activity!!.getString(R.string.confirm_lock_change),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
infoPreference(R.string.parental_controls_info)
|
infoPreference(R.string.parental_controls_info)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user