use of chat.rocket.core.interactors.CanCreateRoomInteractor 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);
}
Aggregations