From ccd3dc730a33e17ee77b67f45c3145dbe684f38c Mon Sep 17 00:00:00 2001 From: S1m Date: Fri, 2 Jul 2021 09:35:31 +0200 Subject: [PATCH] update unifiedpush --- android/app/build.gradle | 2 +- lib/utils/background_push.dart | 14 +------------- pubspec.lock | 2 +- 3 files changed, 3 insertions(+), 15 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 53a57da3..57bbd1cf 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -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.1.0' // needed for unifiedpush + implementation 'com.github.UnifiedPush:android-connector:1.2.0' // needed for unifiedpush } if(file("google-services.json").exists()){ diff --git a/lib/utils/background_push.dart b/lib/utils/background_push.dart index 2a366ea4..534bf522 100644 --- a/lib/utils/background_push.dart +++ b/lib/utils/background_push.dart @@ -313,19 +313,7 @@ class BackgroundPush { } Future setupUp() async { - if (!(await store.getItemBool(SettingKeys.unifiedPushRegistered, false))) { - Logs().i('[Push] UnifiedPush not registered, attempting to do so...'); - await UnifiedPush.registerAppWithDialog(); - } else { - // 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(); + await UnifiedPush.registerAppWithDialog(); } Future _onFcmMessage(Map message) async { diff --git a/pubspec.lock b/pubspec.lock index d966aeb3..fb131c01 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1170,7 +1170,7 @@ packages: name: unifiedpush url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.0.6" universal_html: dependency: "direct main" description: