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
78a69c45
Commit
78a69c45
authored
Jan 07, 2017
by
Yusuke Iwaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
separate session-changed logic.
parent
2824b15b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
30 deletions
+32
-30
MainActivity.java
.../main/java/chat/rocket/android/activity/MainActivity.java
+32
-30
No files found.
app/src/main/java/chat/rocket/android/activity/MainActivity.java
View file @
78a69c45
...
...
@@ -149,7 +149,11 @@ public class MainActivity extends AbstractAuthedActivity {
.
createObjectObserver
(
realm
->
Session
.
queryDefaultSession
(
realm
)
.
isNotNull
(
Session
.
TOKEN
))
.
setOnUpdateListener
(
session
->
{
.
setOnUpdateListener
(
this
::
onSessionChanged
);
sessionObserver
.
sub
();
}
private
void
onSessionChanged
(
@Nullable
Session
session
)
{
if
(
session
==
null
)
{
if
(
isForeground
)
{
LaunchUtil
.
showLoginActivity
(
this
,
serverConfigId
);
...
...
@@ -178,8 +182,6 @@ public class MainActivity extends AbstractAuthedActivity {
}
else
{
tipViewManager
.
updateStatus
(
StatusTicker
.
STATUS_DISMISS
,
null
);
}
});
sessionObserver
.
sub
();
}
private
void
updateSidebarMainFragment
()
{
...
...
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