mirror of
https://github.com/Michatec/Radio.git
synced 2026-06-03 12:20:29 +02:00
feat(notification): support custom notification IDs
Update `NotificationSys.showNotification` to accept an optional `id` parameter. This allows different notifications to be displayed simultaneously by the system instead of overwriting each other. In `SettingsFragment` and `PlayerFragment`, assign specific unique IDs for test, share, and update notifications.
This commit is contained in:
@@ -330,7 +330,8 @@ class SettingsFragment : PreferenceFragmentCompat(), YesNoDialog.YesNoDialogList
|
||||
NotificationSys.showNotification(
|
||||
context,
|
||||
getString(R.string.pref_test_notification_title),
|
||||
getString(R.string.notification_test_content)
|
||||
getString(R.string.notification_test_content),
|
||||
id = 1003
|
||||
)
|
||||
return@setOnPreferenceClickListener true
|
||||
}
|
||||
@@ -413,7 +414,8 @@ class SettingsFragment : PreferenceFragmentCompat(), YesNoDialog.YesNoDialogList
|
||||
NotificationSys.showNotification(
|
||||
context,
|
||||
getString(R.string.pref_share_app_thank_title),
|
||||
getString(R.string.pref_share_app_thank_message)
|
||||
getString(R.string.pref_share_app_thank_message),
|
||||
id = 1002
|
||||
)
|
||||
}
|
||||
return@setOnPreferenceClickListener true
|
||||
|
||||
Reference in New Issue
Block a user