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>
This commit is contained in:
Marcel Hibbe 2022-01-20 11:34:46 +01:00
parent f582525fef
commit 9b55467af3
No known key found for this signature in database
GPG key ID: C793F8B59F43CE7B
3 changed files with 5 additions and 3 deletions

View file

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

View file

@ -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);
}

View file

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