mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 07:05:49 +03:00
Fix notification channel strings not being updated
NotificationManager#createNotificationChannel() is safe to run again even if the notification channel has already been created - in this case it simply updates the name and description, which is what we want. Signed-off-by: AJ Jordan <alex@strugee.net>
This commit is contained in:
parent
beef71974c
commit
ebd5b6f1d6
1 changed files with 1 additions and 2 deletions
|
@ -529,8 +529,7 @@ public class MainApp extends MultiDexApplication implements HasAndroidInjector {
|
|||
String channelId, int channelName,
|
||||
int channelDescription, Context context, int importance) {
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O
|
||||
&& getAppContext() != null
|
||||
&& notificationManager.getNotificationChannel(channelId) == null) {
|
||||
&& getAppContext() != null) {
|
||||
CharSequence name = context.getString(channelName);
|
||||
String description = context.getString(channelDescription);
|
||||
NotificationChannel channel = new NotificationChannel(channelId, name, importance);
|
||||
|
|
Loading…
Reference in a new issue