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
parent f2295f7fe6
commit aa3348e72e
4 changed files with 11 additions and 11 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

@ -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 {

View File

@ -1113,12 +1113,10 @@ packages:
unifiedpush:
dependency: "direct main"
description:
path: "."
ref: main
resolved-ref: a75da94b9b6687abd24951579a13644ed2a62a28
url: "https://github.com/UnifiedPush/flutter-connector.git"
source: git
version: "1.0.1"
name: unifiedpush
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
universal_html:
dependency: "direct main"
description:

View File

@ -65,10 +65,7 @@ dependencies:
sqflite: ^2.0.0+3 # Still used to obtain the database location
sqlite3: ^1.0.0
swipe_to_action: ^0.1.0
unifiedpush:
git:
url: https://github.com/UnifiedPush/flutter-connector.git
ref: main
unifiedpush: ^1.0.2
universal_html: ^2.0.8
url_launcher: ^6.0.3