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
38fd7a5e
Commit
38fd7a5e
authored
Apr 17, 2018
by
Lucio Maciel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't crash on invalid fields for /me
We need to see how to better handle it.
parent
9882f0b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
9 deletions
+15
-9
ProfilePresenter.kt
...t/rocket/android/profile/presentation/ProfilePresenter.kt
+15
-9
No files found.
app/src/main/java/chat/rocket/android/profile/presentation/ProfilePresenter.kt
View file @
38fd7a5e
...
...
@@ -28,15 +28,21 @@ class ProfilePresenter @Inject constructor(private val view: ProfileView,
view
.
showLoading
()
try
{
val
myself
=
retryIO
(
"me"
)
{
client
.
me
()
}
myselfId
=
myself
.
id
!!
val
avatarUrl
=
serverUrl
.
avatarUrl
(
myself
.
username
!!
)
val
email
=
myself
.
emails
?.
getOrNull
(
0
)
?.
address
view
.
showProfile
(
avatarUrl
,
myself
.
name
?:
""
,
myself
.
username
?:
""
,
email
)
val
id
=
myself
.
id
val
username
=
myself
.
username
if
(
id
==
null
||
username
==
null
)
{
view
.
showGenericErrorMessage
()
}
else
{
myselfId
=
id
val
avatarUrl
=
serverUrl
.
avatarUrl
(
username
)
val
email
=
myself
.
emails
?.
getOrNull
(
0
)
?.
address
view
.
showProfile
(
avatarUrl
,
myself
.
name
?:
""
,
myself
.
username
?:
""
,
email
)
}
}
catch
(
exception
:
RocketChatException
)
{
view
.
showMessage
(
exception
)
}
finally
{
...
...
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