From 14074617bddb9fa24cf8f75e6252647f66b2e582 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Tue, 27 Apr 2021 10:10:13 +0200 Subject: [PATCH] Disable independent push notification services only on Android --- lib/helpers/independent_push_notifications_helper.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/helpers/independent_push_notifications_helper.dart b/lib/helpers/independent_push_notifications_helper.dart index 2119dce..30710d3 100644 --- a/lib/helpers/independent_push_notifications_helper.dart +++ b/lib/helpers/independent_push_notifications_helper.dart @@ -1,4 +1,5 @@ import 'package:comunic/ui/dialogs/alert_dialog.dart'; +import 'package:comunic/utils/flutter_utils.dart'; import 'package:comunic/utils/intl_utils.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/services.dart'; @@ -34,6 +35,6 @@ class IndependentPushNotificationsHelper { /// Disable independent push notifications service static Future disable() async { - await platform.invokeMethod("disable"); + if (isAndroid) await platform.invokeMethod("disable"); } }