mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-10 20:57:24 +01:00
Add shortcut to manage app notifications
This commit is contained in:
parent
a7bb059096
commit
8776a45ee9
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user