diff --git a/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.java b/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.java index c4f07b0be..a88669caa 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/AccountVerificationController.java @@ -54,6 +54,7 @@ import com.nextcloud.talk.utils.bundle.BundleKeys; import com.nextcloud.talk.utils.database.user.UserUtils; import com.nextcloud.talk.utils.preferences.AppPreferences; import com.nextcloud.talk.utils.singletons.ApplicationWideMessageHolder; +import com.nextcloud.talk.utils.singletons.MerlinTheWizard; import io.reactivex.CompletableObserver; import io.reactivex.Observer; import io.reactivex.android.schedulers.AndroidSchedulers; @@ -267,6 +268,7 @@ public class AccountVerificationController extends BaseController { @Override public void onNext(UserEntity userEntity) { internalAccountId = userEntity.getId(); + new MerlinTheWizard().initMerlin(); if (new ClosedInterfaceImpl().isGooglePlayServicesAvailable()) { registerForPush(); diff --git a/app/src/main/java/com/nextcloud/talk/utils/singletons/MerlinTheWizard.java b/app/src/main/java/com/nextcloud/talk/utils/singletons/MerlinTheWizard.java index f75966882..162f1386b 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/singletons/MerlinTheWizard.java +++ b/app/src/main/java/com/nextcloud/talk/utils/singletons/MerlinTheWizard.java @@ -21,32 +21,22 @@ package com.nextcloud.talk.utils.singletons; import android.content.Context; -import android.database.Observable; -import android.util.Log; import autodagger.AutoInjector; import com.nextcloud.talk.application.NextcloudTalkApplication; import com.nextcloud.talk.events.NetworkEvent; -import com.nextcloud.talk.models.database.User; import com.nextcloud.talk.models.database.UserEntity; import com.nextcloud.talk.utils.database.user.UserUtils; import com.novoda.merlin.*; -import io.reactivex.disposables.Disposable; -import io.reactivex.functions.Consumer; -import io.requery.Persistable; -import io.requery.reactivex.ReactiveEntityStore; -import io.requery.reactivex.ReactiveResult; -import io.requery.util.ObservableList; import org.greenrobot.eventbus.EventBus; import javax.inject.Inject; -import java.util.List; @AutoInjector(NextcloudTalkApplication.class) public class MerlinTheWizard { private static Merlin merlin; private static MerlinsBeard merlinsBeard; - private UserEntity currentUserEntity; + private UserEntity currentUserEntity; @Inject EventBus eventBus;