Commit cc6302b9 authored by Hussein El Feky's avatar Hussein El Feky

Fixed issue #2230

parent 46301924
......@@ -23,7 +23,6 @@ import chat.rocket.android.settings.presentation.SettingsView
import chat.rocket.android.util.extensions.inflate
import chat.rocket.android.util.extensions.showToast
import chat.rocket.android.util.invalidateFirebaseToken
import com.bumptech.glide.Glide
import dagger.android.support.AndroidSupportInjection
import kotlinx.android.synthetic.main.app_bar.*
import kotlinx.android.synthetic.main.fragment_settings.*
......@@ -65,7 +64,7 @@ class SettingsFragment : Fragment(), SettingsView {
isDeleteAccountEnabled: Boolean,
serverVersion: String
) {
context?.let { Glide.with(it).load(avatar).into(image_avatar) }
image_avatar.setImageURI(avatar)
text_display_name.text = displayName
......@@ -89,7 +88,7 @@ class SettingsFragment : Fragment(), SettingsView {
text_server_version.text = getString(R.string.msg_server_version, serverVersion)
text_logout.setOnClickListener { showLogoutDialog()}
text_logout.setOnClickListener { showLogoutDialog() }
with(text_administration) {
isVisible = isAdministrationEnabled
......@@ -177,7 +176,7 @@ class SettingsFragment : Fragment(), SettingsView {
context?.let {
val builder = AlertDialog.Builder(it)
builder.setTitle(R.string.title_are_you_sure)
.setPositiveButton(R.string.action_logout) { _, _ -> presenter.logout()}
.setPositiveButton(R.string.action_logout) { _, _ -> presenter.logout() }
.setNegativeButton(android.R.string.no) { dialog, _ -> dialog.cancel() }
.create()
.show()
......
......@@ -15,6 +15,6 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:roundedCornerRadius="2dp" />
app:roundedCornerRadius="4dp" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="16dp"
tools:context="preferences.ui.PreferencesFragment">
<com.wang.avi.AVLoadingIndicatorView
android:id="@+id/view_loading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:indicatorColor="@color/colorBlack"
app:indicatorName="BallPulseIndicator"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
<TextView
android:id="@+id/text_analytics_tracking"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/msg_analytics_tracking"
android:textColor="@color/colorPrimaryText"
android:textSize="16sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/text_analytics_tracking_description"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/msg_send_analytics_tracking"
android:textColor="@color/colorSecondaryText"
android:textSize="12sp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text_analytics_tracking" />
<Switch
android:id="@+id/switch_analytics_tracking"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="true"
app:layout_constraintBottom_toBottomOf="@+id/text_analytics_tracking_description"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/text_analytics_tracking" />
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -34,14 +34,13 @@
android:paddingBottom="5dp"
app:layout_constraintTop_toTopOf="parent">
<ImageView
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/image_avatar"
android:layout_width="48dp"
android:layout_height="48dp"
android:background="@drawable/bg_border_user_details_avatar"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:srcCompat="@tools:sample/avatars[6]" />
app:roundedCornerRadius="4dp" />
<TextView
android:id="@+id/text_display_name"
......@@ -248,7 +247,6 @@
android:textColor="#DE000000"
android:textSize="16sp"
android:textStyle="normal"
app:layout_constraintEnd_toStartOf="@id/switch_analytics_tracking"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
......
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