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
81de4f59
Unverified
Commit
81de4f59
authored
Apr 02, 2018
by
Leonardo Aramaki
Committed by
GitHub
Apr 02, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop-2.x' into new/version-check
parents
1e778869
41e40af7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
LoginPresenter.kt
...droid/authentication/login/presentation/LoginPresenter.kt
+12
-4
No files found.
app/src/main/java/chat/rocket/android/authentication/login/presentation/LoginPresenter.kt
View file @
81de4f59
...
@@ -14,6 +14,7 @@ import chat.rocket.android.server.presentation.CheckServerPresenter
...
@@ -14,6 +14,7 @@ import chat.rocket.android.server.presentation.CheckServerPresenter
import
chat.rocket.android.util.VersionInfo
import
chat.rocket.android.util.VersionInfo
import
chat.rocket.android.util.extensions.*
import
chat.rocket.android.util.extensions.*
import
chat.rocket.common.RocketChatException
import
chat.rocket.common.RocketChatException
import
chat.rocket.common.RocketChatTwoFactorException
import
chat.rocket.common.model.Token
import
chat.rocket.common.model.Token
import
chat.rocket.common.util.ifNull
import
chat.rocket.common.util.ifNull
import
chat.rocket.core.RocketChatClient
import
chat.rocket.core.RocketChatClient
...
@@ -224,10 +225,17 @@ class LoginPresenter @Inject constructor(private val view: LoginView,
...
@@ -224,10 +225,17 @@ class LoginPresenter @Inject constructor(private val view: LoginView,
registerPushToken
()
registerPushToken
()
navigator
.
toChatList
()
navigator
.
toChatList
()
}
catch
(
exception
:
RocketChatException
)
{
}
catch
(
exception
:
RocketChatException
)
{
exception
.
message
?.
let
{
when
(
exception
)
{
view
.
showMessage
(
it
)
is
RocketChatTwoFactorException
->
{
}.
ifNull
{
navigator
.
toTwoFA
(
usernameOrEmail
,
password
)
view
.
showGenericErrorMessage
()
}
else
->
{
exception
.
message
?.
let
{
view
.
showMessage
(
it
)
}.
ifNull
{
view
.
showGenericErrorMessage
()
}
}
}
}
}
finally
{
}
finally
{
view
.
hideLoading
()
view
.
hideLoading
()
...
...
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