mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Can reconfigure push notifications
This commit is contained in:
@ -1,5 +1,7 @@
|
||||
import 'package:comunic/helpers/preferences_helper.dart';
|
||||
import 'package:comunic/helpers/server_config_helper.dart';
|
||||
import 'package:comunic/models/api_request.dart';
|
||||
import 'package:comunic/utils/flutter_utils.dart';
|
||||
|
||||
/// Push notifications helper
|
||||
///
|
||||
@ -65,4 +67,9 @@ class PushNotificationsHelper {
|
||||
.key)
|
||||
.addString("firebase_token", firebaseToken)
|
||||
.execWithThrow();
|
||||
|
||||
/// Is true if possible if push notifications are configurable
|
||||
static bool get arePushNotificationsAvailable =>
|
||||
srvConfig.notificationsPolicy.hasFirebase ||
|
||||
(isAndroid && srvConfig.notificationsPolicy.hasFirebase);
|
||||
}
|
||||
|
Reference in New Issue
Block a user