Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
15963ce3
Commit
15963ce3
authored
Feb 13, 2017
by
Tiago Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small clean up
parent
4ab44fd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
15 deletions
+3
-15
MainActivity.java
.../main/java/chat/rocket/android/activity/MainActivity.java
+3
-15
No files found.
app/src/main/java/chat/rocket/android/activity/MainActivity.java
View file @
15963ce3
...
...
@@ -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
(
Realm
User
.
STATUS_ONLINE
)
new
MethodCallHelper
(
this
,
hostname
).
setUserPresence
(
User
.
STATUS_ONLINE
)
.
continueWith
(
new
LogcatIfError
());
}
}
private
void
setUserAwayIfServerAvailable
()
{
if
(
hostname
!=
null
)
{
new
MethodCallHelper
(
this
,
hostname
).
setUserPresence
(
Realm
User
.
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
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment