1
0
mirror of https://gitlab.com/comunic/comunicmobile synced 2025-06-19 00:05:16 +00:00

Ready to pre-configure independent notifications service

This commit is contained in:
2021-04-13 17:56:55 +02:00
parent 7e9a594bae
commit 1400bbbeb7
6 changed files with 73 additions and 6 deletions

View File

@ -1,3 +1,4 @@
import 'package:comunic/helpers/independent_push_notifications_helper.dart';
import 'package:comunic/helpers/push_notifications_helper.dart';
import 'package:comunic/helpers/server_config_helper.dart';
import 'package:comunic/models/config.dart';
@ -15,8 +16,7 @@ import 'package:flutter/material.dart';
Future<void> showInitialPushNotificationsConfiguration(
BuildContext context) async {
// Check if no notifications service are available
if (!PushNotificationsHelper.arePushNotificationsAvailable)
return;
if (!PushNotificationsHelper.arePushNotificationsAvailable) return;
await Navigator.of(context).push(
MaterialPageRoute(builder: (c) => PushNotificationsConfigurationRoute()));
@ -118,9 +118,9 @@ class _PushNotificationsConfigurationRouteState
// TODO: Handle this case.
throw new Exception("Firebase not supported yet!");
break;
case PushNotificationsStatus.INDEPENDENT:
// TODO: Handle this case.
throw new Exception("Independent not supported yet!");
await IndependentPushNotificationsHelper.preConfigure();
break;
default: