From 2c2475dc223301e44980793face67a0f40e48fb1 Mon Sep 17 00:00:00 2001 From: Pierre HUBERT Date: Fri, 16 Apr 2021 08:22:05 +0200 Subject: [PATCH] Do not re-configure local push notification if the same option is selected --- lib/ui/routes/push_notifications_route.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/ui/routes/push_notifications_route.dart b/lib/ui/routes/push_notifications_route.dart index 202e40b..c376269 100644 --- a/lib/ui/routes/push_notifications_route.dart +++ b/lib/ui/routes/push_notifications_route.dart @@ -114,6 +114,11 @@ class _PushNotificationsConfigurationRouteState try { String firebaseToken = ""; + if (currStatus == await PushNotificationsHelper.getLocalStatus()) { + Navigator.of(context).pop(); + return; + } + switch (currStatus) { case PushNotificationsStatus.DISABLED: break;