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
bc944801
Commit
bc944801
authored
Mar 06, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve identation / add whitespaces / Update strings.
parent
3a06f0c2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
18 deletions
+20
-18
ProfilePresenter.kt
...t/rocket/android/profile/presentation/ProfilePresenter.kt
+1
-1
ProfileFragment.kt
...in/java/chat/rocket/android/profile/ui/ProfileFragment.kt
+15
-15
ic_link_black_24dp.xml
app/src/main/res/drawable/ic_link_black_24dp.xml
+1
-0
fragment_profile.xml
app/src/main/res/layout/fragment_profile.xml
+1
-0
strings.xml
app/src/main/res/values-pt-rBR/strings.xml
+1
-1
strings.xml
app/src/main/res/values/strings.xml
+1
-1
No files found.
app/src/main/java/chat/rocket/android/profile/presentation/ProfilePresenter.kt
View file @
bc944801
...
...
@@ -46,7 +46,7 @@ class ProfilePresenter @Inject constructor (private val view: ProfileView,
}
}
fun
updateUserProfile
(
email
:
String
,
name
:
String
,
username
:
String
,
avatarUrl
:
String
=
""
)
{
fun
updateUserProfile
(
email
:
String
,
name
:
String
,
username
:
String
,
avatarUrl
:
String
=
""
)
{
launchUI
(
strategy
)
{
view
.
showLoading
()
try
{
...
...
app/src/main/java/chat/rocket/android/profile/ui/ProfileFragment.kt
View file @
bc944801
...
...
@@ -128,21 +128,21 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
}
private
fun
listenToChanges
()
{
Observables
.
combineLatest
(
text_
name
.
asObservable
(),
text_username
.
asObservable
(),
text_email
.
asObservable
(),
text_avatar_url
.
asObservable
()
)
{
text_name
,
text_username
,
text_email
,
text_avatar_url
->
return
@combineLatest
(
text_name
.
toString
()
!=
currentName
||
text_username
.
toString
()
!=
currentUsername
||
text_email
.
toString
()
!=
currentEmail
||
(
text_avatar_url
.
toString
()!=
""
&&
text_avatar_url
.
toString
()!=
currentAvatar
))
}.
subscribe
({
isValid
->
if
(
isValid
)
{
startActionMode
()
}
else
{
finishActionMode
()
}
})
Observables
.
combineLatest
(
text_name
.
asObservable
(),
text_user
name
.
asObservable
(),
text_email
.
asObservable
(),
text_avatar_url
.
asObservable
())
{
text_name
,
text_username
,
text_email
,
text_avatar_url
->
return
@combineLatest
(
text_name
.
toString
()
!=
currentName
||
text_username
.
toString
()
!=
currentUsername
||
text_email
.
toString
()
!=
currentEmail
||
(
text_avatar_url
.
toString
()
!=
""
&&
text_avatar_url
.
toString
()!=
currentAvatar
))
}.
subscribe
({
isValid
->
if
(
isValid
)
{
startActionMode
()
}
else
{
finishActionMode
()
}
})
}
private
fun
startActionMode
()
{
...
...
app/src/main/res/drawable/ic_link_black_24dp.xml
View file @
bc944801
...
...
@@ -3,6 +3,7 @@
android:height=
"24dp"
android:viewportWidth=
"24.0"
android:viewportHeight=
"24.0"
>
<path
android:fillColor=
"#FF000000"
android:pathData=
"M3.9,12c0,-1.71 1.39,-3.1 3.1,-3.1h4L11,7L7,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5h4v-1.9L7,15.1c-1.71,0 -3.1,-1.39 -3.1,-3.1zM8,13h8v-2L8,11v2zM17,7h-4v1.9h4c1.71,0 3.1,1.39 3.1,3.1s-1.39,3.1 -3.1,3.1h-4L13,17h4c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5z"
/>
...
...
app/src/main/res/layout/fragment_profile.xml
View file @
bc944801
...
...
@@ -46,6 +46,7 @@
android:drawableStart=
"@drawable/ic_email_black_24dp"
android:hint=
"@string/msg_email"
android:inputType=
"textEmailAddress"
/>
<EditText
android:id=
"@+id/text_avatar_url"
style=
"@style/EditText.Profile"
...
...
app/src/main/res/values-pt-rBR/strings.xml
View file @
bc944801
...
...
@@ -28,7 +28,7 @@
<string
name=
"msg_password"
>
senha
</string>
<string
name=
"msg_name"
>
nome
</string>
<string
name=
"msg_email"
>
email
</string>
<string
name=
"msg_avatar_url"
>
URL do
A
vatar
</string>
<string
name=
"msg_avatar_url"
>
URL do
a
vatar
</string>
<string
name=
"msg_or_continue_using_social_accounts"
>
Ou continue através de contas sociais
</string>
<string
name=
"msg_new_user"
>
Novo usuário? %1$s
</string>
<string
name=
"msg_new_user_agreement"
>
Ao proceder você concorda com nossos %1$s e %2$s
</string>
...
...
app/src/main/res/values/strings.xml
View file @
bc944801
...
...
@@ -29,7 +29,7 @@
<string
name=
"msg_password"
>
password
</string>
<string
name=
"msg_name"
>
name
</string>
<string
name=
"msg_email"
>
email
</string>
<string
name=
"msg_avatar_url"
>
A
vatar URL
</string>
<string
name=
"msg_avatar_url"
>
a
vatar URL
</string>
<string
name=
"msg_or_continue_using_social_accounts"
>
Or continue using social accounts
</string>
<string
name=
"msg_new_user"
>
New user? %1$s
</string>
<string
name=
"msg_new_user_agreement"
>
By proceeding you are agreeing to our\n%1$s and %2$s
</string>
...
...
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