Unverified Commit e0d61fe1 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito Committed by GitHub

Merge pull request #862 from RocketChat/update-avatar-using-url

[FIX] Improve indentation / add whitespaces / Update strings.
parents 4ddb5475 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 {
......
......@@ -128,14 +128,14 @@ class ProfileFragment : Fragment(), ProfileView, ActionMode.Callback {
}
private fun listenToChanges() {
Observables.combineLatest(
text_name.asObservable(),
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))
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()
......
......@@ -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"/>
......
......@@ -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"
......
......@@ -29,7 +29,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 Avatar</string>
<string name="msg_avatar_url">URL do avatar</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>
......
......@@ -30,7 +30,7 @@
<string name="msg_password">password</string>
<string name="msg_name">name</string>
<string name="msg_email">email</string>
<string name="msg_avatar_url">Avatar URL</string>
<string name="msg_avatar_url">avatar 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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment