Search in sources :

Example 6 with DebugLog

use of hugo.weaving.DebugLog in project Rocket.Chat.Android by RocketChat.

the class SessionObserver method onLogout.

@DebugLog
private void onLogout() {
    streamNotifyMessage.unregister();
    realmHelper.executeTransaction(realm -> {
        realm.delete(MethodCall.class);
        realm.delete(LoadMessageProcedure.class);
        realm.delete(GetUsersOfRoomsProcedure.class);
        return null;
    }).continueWith(new LogIfError());
}
Also used : Context(android.content.Context) Realm(io.realm.Realm) RealmSession(chat.rocket.persistence.realm.models.internal.RealmSession) RaixPushHelper(chat.rocket.android.api.RaixPushHelper) RealmResults(io.realm.RealmResults) RocketChatCache(chat.rocket.android.RocketChatCache) LoadMessageProcedure(chat.rocket.persistence.realm.models.internal.LoadMessageProcedure) LogIfError(chat.rocket.android.helper.LogIfError) DebugLog(hugo.weaving.DebugLog) List(java.util.List) RealmHelper(chat.rocket.persistence.realm.RealmHelper) GetUsersOfRoomsProcedure(chat.rocket.persistence.realm.models.internal.GetUsersOfRoomsProcedure) StreamRoomMessageManager(chat.rocket.android.service.internal.StreamRoomMessageManager) DDPClientRef(chat.rocket.android.service.DDPClientRef) MethodCall(chat.rocket.persistence.realm.models.internal.MethodCall) LoadMessageProcedure(chat.rocket.persistence.realm.models.internal.LoadMessageProcedure) GetUsersOfRoomsProcedure(chat.rocket.persistence.realm.models.internal.GetUsersOfRoomsProcedure) MethodCall(chat.rocket.persistence.realm.models.internal.MethodCall) LogIfError(chat.rocket.android.helper.LogIfError) DebugLog(hugo.weaving.DebugLog)

Example 7 with DebugLog

use of hugo.weaving.DebugLog in project Rocket.Chat.Android by RocketChat.

the class MainActivity method onHostnameUpdated.

@DebugLog
@Override
protected void onHostnameUpdated() {
    super.onHostnameUpdated();
    if (presenter != null) {
        presenter.release();
    }
    RoomInteractor roomInteractor = new RoomInteractor(new RealmRoomRepository(hostname));
    CanCreateRoomInteractor createRoomInteractor = new CanCreateRoomInteractor(new RealmUserRepository(hostname), new SessionInteractor(new RealmSessionRepository(hostname)));
    SessionInteractor sessionInteractor = new SessionInteractor(new RealmSessionRepository(hostname));
    presenter = new MainPresenter(roomInteractor, createRoomInteractor, sessionInteractor, new MethodCallHelper(this, hostname), ConnectivityManager.getInstance(getApplicationContext()), new RocketChatCache(this));
    updateSidebarMainFragment();
    presenter.bindView(this);
}
Also used : SessionInteractor(chat.rocket.core.interactors.SessionInteractor) MethodCallHelper(chat.rocket.android.api.MethodCallHelper) CanCreateRoomInteractor(chat.rocket.core.interactors.CanCreateRoomInteractor) RoomInteractor(chat.rocket.core.interactors.RoomInteractor) RealmSessionRepository(chat.rocket.persistence.realm.repositories.RealmSessionRepository) CanCreateRoomInteractor(chat.rocket.core.interactors.CanCreateRoomInteractor) RocketChatCache(chat.rocket.android.RocketChatCache) RealmRoomRepository(chat.rocket.persistence.realm.repositories.RealmRoomRepository) RealmUserRepository(chat.rocket.persistence.realm.repositories.RealmUserRepository) DebugLog(hugo.weaving.DebugLog)

Aggregations

DebugLog (hugo.weaving.DebugLog)7 Context (android.content.Context)3 RocketChatCache (chat.rocket.android.RocketChatCache)3 LogIfError (chat.rocket.android.helper.LogIfError)3 MethodCallHelper (chat.rocket.android.api.MethodCallHelper)2 DDPClientRef (chat.rocket.android.service.DDPClientRef)2 RealmHelper (chat.rocket.persistence.realm.RealmHelper)2 Realm (io.realm.Realm)2 RealmResults (io.realm.RealmResults)2 List (java.util.List)2 Handler (android.os.Handler)1 RaixPushHelper (chat.rocket.android.api.RaixPushHelper)1 Registrable (chat.rocket.android.service.Registrable)1 StreamNotifyUserSubscriptionsChanged (chat.rocket.android.service.ddp.stream.StreamNotifyUserSubscriptionsChanged)1 StreamRoomMessageManager (chat.rocket.android.service.internal.StreamRoomMessageManager)1 CanCreateRoomInteractor (chat.rocket.core.interactors.CanCreateRoomInteractor)1 RoomInteractor (chat.rocket.core.interactors.RoomInteractor)1 SessionInteractor (chat.rocket.core.interactors.SessionInteractor)1 RealmUser (chat.rocket.persistence.realm.models.ddp.RealmUser)1 GetUsersOfRoomsProcedure (chat.rocket.persistence.realm.models.internal.GetUsersOfRoomsProcedure)1