Add shortcut to manage app notifications
Cette révision appartient à :
Parent
a7bb059096
révision
8776a45ee9
2 fichiers modifiés avec 14 ajouts et 0 suppressions
|
@ -1,6 +1,8 @@
|
|||
package eu.kanade.tachiyomi.ui.setting
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.provider.Settings
|
||||
import androidx.biometric.BiometricManager
|
||||
import androidx.preference.PreferenceScreen
|
||||
import eu.kanade.tachiyomi.R
|
||||
|
@ -116,6 +118,17 @@ class SettingsGeneralController : SettingsController() {
|
|||
defaultValue = "1"
|
||||
summary = "%s"
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
preference {
|
||||
titleRes = R.string.pref_manage_notifications
|
||||
onClick {
|
||||
val intent = Intent(Settings.ACTION_APP_NOTIFICATION_SETTINGS).apply {
|
||||
putExtra(Settings.EXTRA_APP_PACKAGE, context.packageName)
|
||||
}
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.pref_category_security
|
||||
|
|
|
@ -131,6 +131,7 @@
|
|||
<string name="pref_language">Language</string>
|
||||
<string name="system_default">System default</string>
|
||||
<string name="pref_date_format">Date format</string>
|
||||
<string name="pref_manage_notifications">Manage notifications</string>
|
||||
|
||||
<string name="pref_category_security">Security</string>
|
||||
<string name="lock_with_biometrics">Lock with biometrics</string>
|
||||
|
|
Référencer dans un nouveau ticket