refactor: Check if app is in foreground on pushhelper
This commit is contained in:
parent
085bb19da5
commit
c6007a3c3d
9 changed files with 4 additions and 25 deletions
|
|
@ -81,10 +81,8 @@ Future<void> _tryPushHelper(
|
|||
notification.toJson(),
|
||||
);
|
||||
|
||||
if (!isBackgroundMessage &&
|
||||
if (notification.roomId != null &&
|
||||
activeRoomId == notification.roomId &&
|
||||
activeRoomId != null &&
|
||||
client.syncPresence == null &&
|
||||
WidgetsBinding.instance.lifecycleState == AppLifecycleState.resumed) {
|
||||
Logs().v('Room is in foreground. Stop push helper here.');
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue