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:
AJ Jordan 2021-10-20 00:41:26 -07:00
parent beef71974c
commit ebd5b6f1d6

View file

@ -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);