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

This commit is contained in:
Sorunome 2021-04-30 09:52:58 +02:00
parent 34b29e3e64
commit 90b0a43b44
No known key found for this signature in database
GPG Key ID: B19471D07FC9BE9C
3 changed files with 7 additions and 5 deletions

View File

@ -85,7 +85,7 @@ dependencies {
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation "net.zetetic:android-database-sqlcipher:4.4.0" // needed for moor_ffi w/ sqlcipher
implementation 'com.github.UnifiedPush:android-connector:1.0.0-beta3' // needed for unifiedpush
implementation 'com.github.UnifiedPush:android-connector:1.1.0' // needed for unifiedpush
}
if(file("google-services.json").exists()){

View File

@ -318,6 +318,11 @@ class BackgroundPush {
// make sure the endpoint is up-to-date etc.
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();
}
}

View File

@ -14,10 +14,7 @@ dependencies:
git:
url: https://gitlab.com/famedly/famedlysdk.git
ref: main
unifiedpush:
git:
url: https://github.com/UnifiedPush/flutter-connector.git
ref: main
unifiedpush: ^1.0.2
fcm_shared_isolate:
git:
url: https://gitlab.com/famedly/libraries/fcm_shared_isolate.git