Commit 15963ce3 authored by Tiago Cunha's avatar Tiago Cunha

Small clean up

parent 4ab44fd0
......@@ -18,9 +18,7 @@ import chat.rocket.android.helper.LogcatIfError;
import chat.rocket.core.interactors.CanCreateRoomInteractor;
import chat.rocket.core.interactors.RoomInteractor;
import chat.rocket.core.interactors.SessionInteractor;
import chat.rocket.persistence.realm.models.ddp.RealmUser;
import chat.rocket.persistence.realm.models.internal.RealmSession;
import chat.rocket.persistence.realm.RealmObjectObserver;
import chat.rocket.core.models.User;
import chat.rocket.android.service.ConnectivityManager;
import chat.rocket.android.widget.RoomToolbar;
import chat.rocket.persistence.realm.repositories.RealmRoomRepository;
......@@ -33,7 +31,6 @@ import hugo.weaving.DebugLog;
*/
public class MainActivity extends AbstractAuthedActivity implements MainContract.View {
private RealmObjectObserver<RealmSession> sessionObserver;
private StatusTicker statusTicker;
private MainContract.Presenter presenter;
......@@ -93,14 +90,14 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
private void setUserOnlineIfServerAvailable() {
if (hostname != null) {
new MethodCallHelper(this, hostname).setUserPresence(RealmUser.STATUS_ONLINE)
new MethodCallHelper(this, hostname).setUserPresence(User.STATUS_ONLINE)
.continueWith(new LogcatIfError());
}
}
private void setUserAwayIfServerAvailable() {
if (hostname != null) {
new MethodCallHelper(this, hostname).setUserPresence(RealmUser.STATUS_AWAY)
new MethodCallHelper(this, hostname).setUserPresence(User.STATUS_AWAY)
.continueWith(new LogcatIfError());
}
}
......@@ -205,15 +202,6 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
presenter.onOpenRoom(hostname, roomId);
}
@Override
protected void onDestroy() {
if (sessionObserver != null) {
sessionObserver.unsub();
sessionObserver = null;
}
super.onDestroy();
}
@Override
protected boolean onBackPress() {
return closeSidebarIfNeeded() || super.onBackPress();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment