use of chat.rocket.android.RocketChatCache 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);
}
use of chat.rocket.android.RocketChatCache in project Rocket.Chat.Android by RocketChat.
the class AbstractAuthedActivity method onCreate.
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
rocketChatCache = new RocketChatCache(this);
if (savedInstanceState == null) {
handleIntent(getIntent());
}
updateHostnameIfNeeded(rocketChatCache.getSelectedServerHostname());
updateRoomIdIfNeeded(rocketChatCache.getSelectedRoomId());
}
Aggregations