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
32239224
Commit
32239224
authored
Mar 05, 2018
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix again mistaken refactoring.
parent
72430ee3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
ProfilePresenter.kt
...t/rocket/android/profile/presentation/ProfilePresenter.kt
+2
-2
ProfileFragment.kt
...in/java/chat/rocket/android/profile/ui/ProfileFragment.kt
+8
-8
No files found.
app/src/main/java/chat/rocket/android/profile/presentation/ProfilePresenter.kt
View file @
32239224
...
...
@@ -29,8 +29,8 @@ class ProfilePresenter @Inject constructor (private val view: ProfileView,
val
avatarUrl
=
UrlHelper
.
getAvatarUrl
(
serverUrl
,
myself
.
username
!!
)
view
.
showProfile
(
avatarUrl
,
myself
.
name
!!
,
myself
.
username
!!
,
myself
.
name
?:
""
,
myself
.
username
?:
""
,
myself
.
emails
?.
get
(
0
)
?.
address
!!
)
}
catch
(
exception
:
RocketChatException
)
{
...
...
app/src/main/java/chat/rocket/android/profile/ui/ProfileFragment.kt
View file @
32239224
...
...
@@ -50,7 +50,7 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
override
fun
showProfile
(
avatarUrl
:
String
,
name
:
String
,
username
:
String
,
email
:
String
)
{
image_avatar
.
setImageURI
(
avatarUrl
)
text_
user
name
.
textContent
=
name
text_name
.
textContent
=
name
text_username
.
textContent
=
username
text_email
.
textContent
=
email
...
...
@@ -124,13 +124,13 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
}
private
fun
listenToChanges
()
{
Observables
.
combineLatest
(
text_
user
name
.
asObservable
(),
text_username
.
asObservable
(),
text_email
.
asObservable
()).
subscribe
({
t
->
if
(
t
.
first
.
toString
()
!=
currentName
||
t
.
second
.
toString
()
!=
currentUsername
||
t
.
third
.
toString
()
!=
currentEmail
)
{
startActionMode
()
}
else
{
finishActionMode
()
}
})
Observables
.
combineLatest
(
text_name
.
asObservable
(),
text_username
.
asObservable
(),
text_email
.
asObservable
()).
subscribe
({
t
->
if
(
t
.
first
.
toString
()
!=
currentName
||
t
.
second
.
toString
()
!=
currentUsername
||
t
.
third
.
toString
()
!=
currentEmail
)
{
startActionMode
()
}
else
{
finishActionMode
()
}
})
}
private
fun
startActionMode
()
{
...
...
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