mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 15:52:40 +00:00
Bug Fix - Notification explosion on initial sync
Add sanity check: Do not display local notifications during the initial sync.
This commit is contained in:
parent
8ce87e78a8
commit
c117ee7531
1 changed files with 7 additions and 1 deletions
|
@ -2295,9 +2295,15 @@ NSString *const kAppDelegateNetworkStatusDidChangeNotification = @"kAppDelegateN
|
||||||
|
|
||||||
MXOnNotification notificationListenerBlock = ^(MXEvent *event, MXRoomState *roomState, MXPushRule *rule) {
|
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)
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue