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
99a482ea
Commit
99a482ea
authored
Mar 05, 2018
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix more refactoring mistakes once again
parent
14f5b942
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
12 deletions
+12
-12
ProfilePresenter.kt
...t/rocket/android/profile/presentation/ProfilePresenter.kt
+10
-10
ProfileFragment.kt
...in/java/chat/rocket/android/profile/ui/ProfileFragment.kt
+2
-2
No files found.
app/src/main/java/chat/rocket/android/profile/presentation/ProfilePresenter.kt
View file @
99a482ea
...
@@ -13,10 +13,10 @@ import chat.rocket.core.internal.rest.setAvatar
...
@@ -13,10 +13,10 @@ import chat.rocket.core.internal.rest.setAvatar
import
chat.rocket.core.internal.rest.updateProfile
import
chat.rocket.core.internal.rest.updateProfile
import
javax.inject.Inject
import
javax.inject.Inject
class
ProfilePresenter
@Inject
constructor
(
private
val
view
:
ProfileView
,
class
ProfilePresenter
@Inject
constructor
(
private
val
view
:
ProfileView
,
private
val
strategy
:
CancelStrategy
,
private
val
strategy
:
CancelStrategy
,
serverInteractor
:
GetCurrentServerInteractor
,
serverInteractor
:
GetCurrentServerInteractor
,
factory
:
RocketChatClientFactory
)
{
factory
:
RocketChatClientFactory
)
{
private
val
serverUrl
=
serverInteractor
.
get
()
!!
private
val
serverUrl
=
serverInteractor
.
get
()
!!
private
val
client
:
RocketChatClient
=
factory
.
create
(
serverUrl
)
private
val
client
:
RocketChatClient
=
factory
.
create
(
serverUrl
)
private
lateinit
var
myselfId
:
String
private
lateinit
var
myselfId
:
String
...
@@ -29,17 +29,17 @@ class ProfilePresenter @Inject constructor (private val view: ProfileView,
...
@@ -29,17 +29,17 @@ class ProfilePresenter @Inject constructor (private val view: ProfileView,
myselfId
=
myself
.
id
myselfId
=
myself
.
id
val
avatarUrl
=
UrlHelper
.
getAvatarUrl
(
serverUrl
,
myself
.
username
!!
)
val
avatarUrl
=
UrlHelper
.
getAvatarUrl
(
serverUrl
,
myself
.
username
!!
)
view
.
showProfile
(
view
.
showProfile
(
avatarUrl
,
avatarUrl
,
myself
.
name
?:
""
,
myself
.
name
?:
""
,
myself
.
username
?:
""
,
myself
.
username
?:
""
,
myself
.
emails
?.
get
(
0
)
?.
address
!!
myself
.
emails
?.
get
(
0
)
?.
address
!!
)
)
}
catch
(
exception
:
RocketChatException
)
{
}
catch
(
exception
:
RocketChatException
)
{
exception
.
message
?.
let
{
exception
.
message
?.
let
{
view
.
showMessage
(
it
)
view
.
showMessage
(
it
)
}.
ifNull
{
}.
ifNull
{
view
.
showGenericErrorMessage
()
view
.
showGenericErrorMessage
()
}
}
}
finally
{
}
finally
{
view
.
hideLoading
()
view
.
hideLoading
()
}
}
...
...
app/src/main/java/chat/rocket/android/profile/ui/ProfileFragment.kt
View file @
99a482ea
...
@@ -56,8 +56,8 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
...
@@ -56,8 +56,8 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
text_email
.
textContent
=
email
text_email
.
textContent
=
email
text_avatar_url
.
textContent
=
""
text_avatar_url
.
textContent
=
""
currentName
=
name
currentName
=
user
name
currentUsername
=
user
name
currentUsername
=
name
currentEmail
=
email
currentEmail
=
email
currentAvatar
=
avatarUrl
currentAvatar
=
avatarUrl
...
...
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