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
42f134e0
Commit
42f134e0
authored
Feb 16, 2017
by
Tiago Cunha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed regression on login state
parent
1c0e06e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
LoginPresenter.java
...ain/java/chat/rocket/android/activity/LoginPresenter.java
+9
-0
No files found.
app/src/main/java/chat/rocket/android/activity/LoginPresenter.java
View file @
42f134e0
...
...
@@ -16,6 +16,8 @@ public class LoginPresenter extends BasePresenter<LoginContract.View>
private
final
SessionInteractor
sessionInteractor
;
private
final
ConnectivityManagerApi
connectivityManagerApi
;
private
boolean
isLogging
=
false
;
public
LoginPresenter
(
String
hostname
,
SessionInteractor
sessionInteractor
,
ConnectivityManagerApi
connectivityManagerApi
)
{
...
...
@@ -35,6 +37,10 @@ public class LoginPresenter extends BasePresenter<LoginContract.View>
return
;
}
if
(
isLogging
)
{
return
;
}
loadSessionState
();
}
...
...
@@ -46,12 +52,15 @@ public class LoginPresenter extends BasePresenter<LoginContract.View>
.
subscribe
(
state
->
{
switch
(
state
)
{
case
UNAVAILABLE:
isLogging
=
true
;
view
.
showLogin
(
hostname
);
break
;
case
INVALID:
isLogging
=
false
;
view
.
showRetryLogin
(
hostname
);
break
;
case
VALID:
isLogging
=
false
;
view
.
closeView
();
}
});
...
...
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