[Gekidou] Update Splash Screen / App icons and Android snooze Push Notifications (#5658)

* Android push notification snooze

* Android splash & icons

* iOS splash & icons

* Update project assets

* Replace iOS assets using Fastlane

* Remove configure_telemetry_android from Fastlane script

* Update Fastlane with master branch

* Fix Android fastlane build

* replace reference for com.mattermost.rnbeta.* imports

* Set iOS ENTRY_FILE as index.ts
This commit is contained in:
Elias Nahum
2021-08-31 14:58:09 -04:00
committed by GitHub
parent c3cedc2901
commit b5c5949b7d
186 changed files with 482 additions and 158 deletions

View File

@@ -1,11 +1,13 @@
package com.mattermost.rnbeta;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.service.notification.StatusBarNotification;
import android.util.Log;
import androidx.annotation.Nullable;
@@ -53,10 +55,23 @@ public class CustomPushNotification extends PushNotification {
return;
}
notifications.remove(notificationId);
saveNotificationsMap(context, notificationsInChannel);
final NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
final NotificationManager notificationManager = context.getSystemService(NotificationManager.class);
notificationManager.cancel(notificationId);
notifications.remove(notificationId);
final StatusBarNotification[] statusNotifications = notificationManager.getActiveNotifications();
boolean hasMore = false;
for (final StatusBarNotification status : statusNotifications) {
if (status.getNotification().extras.getString("channel_id").equals(channelId)) {
hasMore = true;
break;
}
}
if (!hasMore) {
notificationsInChannel.remove(channelId);
}
saveNotificationsMap(context, notificationsInChannel);
}
}