mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 16:18:55 +01:00 
			
		
		
		
	Add shortcut to manage app notifications
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user