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
fcce8693
Commit
fcce8693
authored
Sep 13, 2017
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly handling app resume cases when either the hostname or the MainPresenter is null
parent
6d3b0f34
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
MainActivity.java
.../main/java/chat/rocket/android/activity/MainActivity.java
+8
-1
MethodCallHelper.java
...c/main/java/chat/rocket/android/api/MethodCallHelper.java
+1
-1
No files found.
app/src/main/java/chat/rocket/android/activity/MainActivity.java
View file @
fcce8693
...
@@ -66,7 +66,14 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
...
@@ -66,7 +66,14 @@ public class MainActivity extends AbstractAuthedActivity implements MainContract
@Override
@Override
protected
void
onResume
()
{
protected
void
onResume
()
{
super
.
onResume
();
super
.
onResume
();
if
(
presenter
!=
null
)
{
if
(
hostname
==
null
||
presenter
==
null
)
{
hostname
=
new
RocketChatCache
(
getApplicationContext
()).
getSelectedServerHostname
();
if
(
hostname
==
null
)
{
showAddServerScreen
();
}
else
{
onHostnameUpdated
();
}
}
else
{
presenter
.
bindViewOnly
(
this
);
presenter
.
bindViewOnly
(
this
);
presenter
.
loadSignedInServers
(
hostname
);
presenter
.
loadSignedInServers
(
hostname
);
}
}
...
...
app/src/main/java/chat/rocket/android/api/MethodCallHelper.java
View file @
fcce8693
...
@@ -52,7 +52,7 @@ public class MethodCallHelper {
...
@@ -52,7 +52,7 @@ public class MethodCallHelper {
*/
*/
public
MethodCallHelper
(
Context
context
,
String
hostname
)
{
public
MethodCallHelper
(
Context
context
,
String
hostname
)
{
this
.
context
=
context
.
getApplicationContext
();
this
.
context
=
context
.
getApplicationContext
();
this
.
realmHelper
=
RealmStore
.
get
(
hostname
);
this
.
realmHelper
=
RealmStore
.
get
OrCreate
(
hostname
);
ddpClientRef
=
null
;
ddpClientRef
=
null
;
}
}
...
...
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