mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 04:59:26 +01:00
fix: Foreground push
This commit is contained in:
parent
2089e62465
commit
ea1cefaab2
@ -24,9 +24,11 @@ abstract class FirebaseController {
|
||||
static final FlutterLocalNotificationsPlugin
|
||||
_flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
|
||||
static BuildContext context;
|
||||
static MatrixState matrix;
|
||||
|
||||
static Future<void> setupFirebase(
|
||||
MatrixState matrix, String clientName) async {
|
||||
FirebaseController.matrix = matrix;
|
||||
if (!PlatformInfos.isMobile) return;
|
||||
final client = matrix.client;
|
||||
if (Platform.isIOS) iOS_Permission();
|
||||
@ -156,7 +158,7 @@ abstract class FirebaseController {
|
||||
await _flutterLocalNotificationsPlugin.cancelAll();
|
||||
return null;
|
||||
}
|
||||
if (context != null && Matrix.of(context).activeRoomId == roomId) {
|
||||
if (context != null && matrix.activeRoomId == roomId) {
|
||||
Logs().i('[Push] New clearing push');
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user