1
0
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:
2021-04-13 17:21:00 +02:00
parent db49b6fa6b
commit 7e9a594bae
3 changed files with 27 additions and 2 deletions

View File

@ -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);
}