chore: Update UP and automatically re-register UP on startup

This commit is contained in:
Christian Pauly 2021-04-30 16:59:26 +02:00
commit 08bae9f6ba
4 changed files with 11 additions and 11 deletions

View file

@ -319,6 +319,11 @@ class BackgroundPush {
await _newUpEndpoint(
await store.getItem(SettingKeys.unifiedPushEndpoint));
}
// re-register the app without a dialog. This should be safe,
// and allows recovering from app deletion in gotify, for instance
Logs().i('[Push] UnifiedPush registration found, re-registering');
await UnifiedPush.registerApp();
}
Future<void> _onFcmMessage(Map<dynamic, dynamic> message) async {