Просмотр исходного кода

moved execution of setUpPushTokenRegistration

so token is registered everytime the conversation list is opened.

In NextcloudTalkApplication it was not  executed when app was still in background when opening

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 3 лет назад
Родитель
Сommit
9b55467af3

+ 0 - 2
app/src/main/java/com/nextcloud/talk/application/NextcloudTalkApplication.kt

@@ -167,8 +167,6 @@ class NextcloudTalkApplication : MultiDexApplication(), LifecycleObserver {
         ClosedInterfaceImpl().providerInstallerInstallIfNeededAsync()
         DeviceUtils.ignoreSpecialBatteryFeatures()
 
-        ClosedInterfaceImpl().setUpPushTokenRegistration()
-
         val accountRemovalWork = OneTimeWorkRequest.Builder(AccountRemovalWorker::class.java).build()
         val periodicCapabilitiesUpdateWork = PeriodicWorkRequest.Builder(
             CapabilitiesWorker::class.java,

+ 4 - 0
app/src/main/java/com/nextcloud/talk/controllers/ConversationsListController.java

@@ -85,6 +85,7 @@ import com.nextcloud.talk.models.json.conversations.Conversation;
 import com.nextcloud.talk.models.json.participants.Participant;
 import com.nextcloud.talk.ui.dialog.ChooseAccountDialogFragment;
 import com.nextcloud.talk.utils.ApiUtils;
+import com.nextcloud.talk.utils.ClosedInterfaceImpl;
 import com.nextcloud.talk.utils.ConductorRemapping;
 import com.nextcloud.talk.utils.DisplayUtils;
 import com.nextcloud.talk.utils.KeyboardUtils;
@@ -285,6 +286,9 @@ public class ConversationsListController extends BaseController implements Searc
     @Override
     protected void onAttach(@NonNull View view) {
         super.onAttach(view);
+
+        new ClosedInterfaceImpl().setUpPushTokenRegistration();
+
         if (!eventBus.isRegistered(this)) {
             eventBus.register(this);
         }

+ 1 - 1
scripts/analysis/lint-results.txt

@@ -1,2 +1,2 @@
 DO NOT TOUCH; GENERATED BY DRONE
-      <span class="mdl-layout-title">Lint Report: 1 error and 222 warnings</span>
+      <span class="mdl-layout-title">Lint Report: 1 error and 224 warnings</span>