fix: Foreground push
This commit is contained in:
parent
af962d98e2
commit
1f8f6f8529
1 changed files with 3 additions and 1 deletions
|
|
@ -24,9 +24,11 @@ abstract class FirebaseController {
|
||||||
static final FlutterLocalNotificationsPlugin
|
static final FlutterLocalNotificationsPlugin
|
||||||
_flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
|
_flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin();
|
||||||
static BuildContext context;
|
static BuildContext context;
|
||||||
|
static MatrixState matrix;
|
||||||
|
|
||||||
static Future<void> setupFirebase(
|
static Future<void> setupFirebase(
|
||||||
MatrixState matrix, String clientName) async {
|
MatrixState matrix, String clientName) async {
|
||||||
|
FirebaseController.matrix = matrix;
|
||||||
if (!PlatformInfos.isMobile) return;
|
if (!PlatformInfos.isMobile) return;
|
||||||
final client = matrix.client;
|
final client = matrix.client;
|
||||||
if (Platform.isIOS) iOS_Permission();
|
if (Platform.isIOS) iOS_Permission();
|
||||||
|
|
@ -156,7 +158,7 @@ abstract class FirebaseController {
|
||||||
await _flutterLocalNotificationsPlugin.cancelAll();
|
await _flutterLocalNotificationsPlugin.cancelAll();
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
if (context != null && Matrix.of(context).activeRoomId == roomId) {
|
if (context != null && matrix.activeRoomId == roomId) {
|
||||||
Logs().i('[Push] New clearing push');
|
Logs().i('[Push] New clearing push');
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue