mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
Add quick access to manage notifcations
Co-Authored-By: arkon <4098258+arkon@users.noreply.github.com>
This commit is contained in:
parent
1921c6ad88
commit
361e5c4dc2
2 changed files with 15 additions and 0 deletions
|
@ -1,7 +1,9 @@
|
|||
package eu.kanade.tachiyomi.ui.setting
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Build
|
||||
import android.os.Bundle
|
||||
import android.provider.Settings
|
||||
import android.view.View
|
||||
import androidx.preference.PreferenceScreen
|
||||
import eu.kanade.tachiyomi.BuildConfig
|
||||
|
@ -63,6 +65,18 @@ class SettingsGeneralController : SettingsController() {
|
|||
summaryRes = R.string.pressing_back_to_start
|
||||
defaultValue = true
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
preference {
|
||||
key = "pref_manage_notifications"
|
||||
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.app_shortcuts
|
||||
|
|
|
@ -719,6 +719,7 @@
|
|||
<string name="security">Security</string>
|
||||
<string name="starting_screen">Starting screen</string>
|
||||
<string name="back_to_start">Back to start</string>
|
||||
<string name="pref_manage_notifications">Manage notifications</string>
|
||||
<string name="pressing_back_to_start">Pressing back to starting screen</string>
|
||||
<string name="auto_updates">Auto-updates</string>
|
||||
<string name="auto_update_app">Auto-update app</string>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue