From 776d892d27a8e2583b03c912f1d58bb12c7a7cdc Mon Sep 17 00:00:00 2001 From: Onuray Sahin Date: Wed, 26 Aug 2020 12:27:12 +0300 Subject: [PATCH] Increase version of uCrop library which supports Android 10. --- CHANGES.md | 1 + vector/build.gradle | 2 +- .../im/vector/app/features/media/BigImageViewerActivity.kt | 4 +--- .../im/vector/app/features/roomprofile/RoomProfileFragment.kt | 4 +--- .../app/features/settings/VectorSettingsGeneralFragment.kt | 3 +-- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index d3a16c9b29..0ab511820a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,7 @@ Improvements 🙌: Bugfix 🐛: - Display name not shown under Settings/General (#1926) + - Change user or room avatar: when selecting Gallery, I'm not proposed to crop the selected image (#1590) Translations 🗣: - diff --git a/vector/build.gradle b/vector/build.gradle index c04de62367..ef2d6c3d9e 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -378,7 +378,7 @@ dependencies { implementation "com.github.bumptech.glide:glide:$glide_version" kapt "com.github.bumptech.glide:compiler:$glide_version" implementation 'com.danikula:videocache:2.7.1' - implementation 'com.github.yalantis:ucrop:2.2.4' + implementation 'com.github.yalantis:ucrop:2.2.6' // Badge for compatibility implementation 'me.leolin:ShortcutBadger:1.1.22@aar' diff --git a/vector/src/main/java/im/vector/app/features/media/BigImageViewerActivity.kt b/vector/src/main/java/im/vector/app/features/media/BigImageViewerActivity.kt index 9d0a931a32..c619b4aa92 100644 --- a/vector/src/main/java/im/vector/app/features/media/BigImageViewerActivity.kt +++ b/vector/src/main/java/im/vector/app/features/media/BigImageViewerActivity.kt @@ -144,9 +144,7 @@ class BigImageViewerActivity : VectorBaseActivity() { .get(MultiPicker.IMAGE) .getSelectedFiles(this, requestCode, resultCode, data) .firstOrNull()?.let { - // TODO. UCrop library cannot read from Gallery. For now, we will set avatar as it is. - // onRoomAvatarSelected(it) - onAvatarCropped(it.contentUri) + onRoomAvatarSelected(it) } } UCrop.REQUEST_CROP -> data?.let { onAvatarCropped(UCrop.getOutput(it)) } diff --git a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt index 2722d54950..075ba1bc10 100644 --- a/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt +++ b/vector/src/main/java/im/vector/app/features/roomprofile/RoomProfileFragment.kt @@ -301,9 +301,7 @@ class RoomProfileFragment @Inject constructor( .get(MultiPicker.IMAGE) .getSelectedFiles(requireContext(), requestCode, resultCode, data) .firstOrNull()?.let { - // TODO. UCrop library cannot read from Gallery. For now, we will set avatar as it is. - // onRoomAvatarSelected(it) - onAvatarCropped(it.contentUri) + onRoomAvatarSelected(it) } } UCrop.REQUEST_CROP -> data?.let { onAvatarCropped(UCrop.getOutput(it)) } diff --git a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGeneralFragment.kt b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGeneralFragment.kt index 31de5ddd67..e31b81b162 100644 --- a/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGeneralFragment.kt +++ b/vector/src/main/java/im/vector/app/features/settings/VectorSettingsGeneralFragment.kt @@ -356,8 +356,7 @@ class VectorSettingsGeneralFragment : VectorSettingsBaseFragment() { .get(MultiPicker.IMAGE) .getSelectedFiles(requireContext(), requestCode, resultCode, data) .firstOrNull()?.let { - // TODO. UCrop library cannot read from Gallery. For now, we will set avatar as it is. - onAvatarCropped(it.contentUri) + onAvatarSelected(it) } } UCrop.REQUEST_CROP -> data?.let { onAvatarCropped(UCrop.getOutput(it)) }