migrated custom timetable events to Marianum-Connect and refactored push notification handling
This commit is contained in:
@@ -63,6 +63,10 @@ class TalkSection extends StatelessWidget {
|
||||
Haptics.selection();
|
||||
final enabled = e ?? false;
|
||||
settings.val(write: true).notificationSettings.enabled = enabled;
|
||||
// Turning off does NOT unregister: the device stays subscribed so
|
||||
// silent sync pushes keep arriving; the message handler and iOS
|
||||
// NSE suppress only the visible notification (via the mirrored
|
||||
// flag). Enabling (re-)registers and ensures the OS permission.
|
||||
if (enabled) {
|
||||
final messenger = ScaffoldMessenger.of(context);
|
||||
unawaited(() async {
|
||||
@@ -82,8 +86,6 @@ class TalkSection extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
}());
|
||||
} else {
|
||||
unawaited(PushRegistration().unregister());
|
||||
}
|
||||
},
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user