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
29edff96
Unverified
Commit
29edff96
authored
Apr 18, 2019
by
Filipe de Lima Brito
Committed by
GitHub
Apr 18, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2231 from HusseinElFeky/patch-2
[FIX] Fixed profile avatar not updating when changed
parents
d01a94f4
a6e2523e
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
64 deletions
+12
-64
SettingsFragment.kt
.../java/chat/rocket/android/settings/ui/SettingsFragment.kt
+5
-6
UserDetailsFragment.kt
...chat/rocket/android/userdetails/ui/UserDetailsFragment.kt
+4
-1
avatar_profile.xml
app/src/main/res/layout/avatar_profile.xml
+1
-1
fragment_preferences.xml
app/src/main/res/layout/fragment_preferences.xml
+0
-52
fragment_settings.xml
app/src/main/res/layout/fragment_settings.xml
+2
-4
No files found.
app/src/main/java/chat/rocket/android/settings/ui/SettingsFragment.kt
View file @
29edff96
...
...
@@ -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
...
...
@@ -143,8 +142,8 @@ class SettingsFragment : Fragment(), SettingsView {
private
fun
contactSupport
()
{
val
uriText
=
"mailto:${"
support
@rocket
.
chat
"}"
+
"?subject="
+
Uri
.
encode
(
getString
(
R
.
string
.
msg_android_app_support
))
+
"&body="
+
Uri
.
encode
(
getDeviceAndAppInformation
())
"?subject="
+
Uri
.
encode
(
getString
(
R
.
string
.
msg_android_app_support
))
+
"&body="
+
Uri
.
encode
(
getDeviceAndAppInformation
())
with
(
Intent
(
Intent
.
ACTION_SENDTO
))
{
data
=
uriText
.
toUri
()
...
...
@@ -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
()
...
...
app/src/main/java/chat/rocket/android/userdetails/ui/UserDetailsFragment.kt
View file @
29edff96
...
...
@@ -20,6 +20,7 @@ import chat.rocket.android.util.extensions.showToast
import
chat.rocket.android.util.extensions.ui
import
com.bumptech.glide.Glide
import
com.bumptech.glide.load.MultiTransformation
import
com.bumptech.glide.load.engine.DiskCacheStrategy
import
com.bumptech.glide.load.resource.bitmap.CenterCrop
import
com.bumptech.glide.load.resource.bitmap.RoundedCorners
import
com.bumptech.glide.request.RequestOptions
...
...
@@ -86,6 +87,8 @@ class UserDetailsFragment : Fragment(), UserDetailsView {
isVideoCallAllowed
:
Boolean
)
{
val
requestBuilder
=
Glide
.
with
(
this
).
load
(
avatarUrl
)
.
apply
(
RequestOptions
.
skipMemoryCacheOf
(
true
))
.
apply
(
RequestOptions
.
diskCacheStrategyOf
(
DiskCacheStrategy
.
NONE
))
requestBuilder
.
apply
(
RequestOptions
.
bitmapTransform
(
MultiTransformation
(
BlurTransformation
(),
CenterCrop
()))
...
...
@@ -147,4 +150,4 @@ class UserDetailsFragment : Fragment(), UserDetailsView {
private
fun
setupListeners
()
{
image_arrow_back
.
setOnClickListener
{
activity
?.
onBackPressed
()
}
}
}
\ No newline at end of file
}
app/src/main/res/layout/avatar_profile.xml
View file @
29edff96
...
...
@@ -15,6 +15,6 @@
app:layout_constraintLeft_toLeftOf=
"parent"
app:layout_constraintRight_toRightOf=
"parent"
app:layout_constraintTop_toTopOf=
"parent"
app:roundedCornerRadius=
"
2
dp"
/>
app:roundedCornerRadius=
"
4
dp"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
app/src/main/res/layout/fragment_preferences.xml
deleted
100644 → 0
View file @
d01a94f4
<?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
app/src/main/res/layout/fragment_settings.xml
View file @
29edff96
...
...
@@ -34,14 +34,13 @@
android:paddingBottom=
"5dp"
app:layout_constraintTop_toTopOf=
"parent"
>
<
Imag
eView
<
com.facebook.drawee.view.SimpleDrawe
eView
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"
/>
...
...
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