Merge pull request #1577 from vector-im/notif_explosion

Bug Fix - Notification explosion on initial sync
This commit is contained in:
giomfo
2017-10-13 17:14:25 +02:00
committed by GitHub
+7 -1
View File
@@ -2295,9 +2295,15 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
MXOnNotification notificationListenerBlock = ^(MXEvent *event, MXRoomState *roomState, MXPushRule *rule) {
// Do not display local notification if the app is not running in background.
if ([[UIApplication sharedApplication] applicationState] != UIApplicationStateBackground)
{
// Do not display local notification if the app is not running in background.
return;
}
// Do not display local notifications during the initial sync.
if (!account.mxSession.isEventStreamInitialised)
{
return;
}