Init Merlin when we add an account

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2019-05-29 15:28:31 +02:00
parent 27d69e73d1
commit 215b339d1e
2 changed files with 3 additions and 11 deletions

View file

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

View file

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