migrated custom timetable events to Marianum-Connect and refactored push notification handling

This commit is contained in:
2026-07-12 14:31:48 +02:00
parent c444ed54a5
commit 91a6216f66
28 changed files with 474 additions and 212 deletions
@@ -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());
}
},
),