forked from upstream-mirrors/quik
Move all notification related prefs to separate activity for all API versions
This commit is contained in:
@@ -178,6 +178,12 @@ class Navigator @Inject constructor(private val context: Context, private val no
|
||||
}
|
||||
|
||||
fun showNotificationSettings(threadId: Long = 0) {
|
||||
val intent = Intent(context, NotificationPrefsActivity::class.java)
|
||||
intent.putExtra("threadId", threadId)
|
||||
startActivity(intent)
|
||||
}
|
||||
|
||||
fun showNotificationChannel(threadId: Long = 0) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
if (threadId != 0L) {
|
||||
notificationManager.createNotificationChannel(threadId)
|
||||
@@ -188,10 +194,6 @@ class Navigator @Inject constructor(private val context: Context, private val no
|
||||
intent.putExtra(Settings.EXTRA_CHANNEL_ID, channelId)
|
||||
intent.putExtra(Settings.EXTRA_APP_PACKAGE, context.packageName)
|
||||
startActivity(intent)
|
||||
} else {
|
||||
val intent = Intent(context, NotificationPrefsActivity::class.java)
|
||||
intent.putExtra("threadId", threadId)
|
||||
startActivity(intent)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user