diff --git a/app/build.gradle b/app/build.gradle index 5f280a348..c06dfde8c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -156,9 +156,9 @@ dependencies { implementation "com.mikepenz:materialdrawer-iconics:$materialdrawerVersion" implementation 'com.mikepenz:google-material-typeface:3.0.1.4.original-kotlin@aar' - implementation "com.theartofdev.edmodo:android-image-cropper:2.8.0" + implementation "com.github.CanHub:Android-Image-Cropper:3.1.0" - implementation "de.c1710:filemojicompat:1.0.17" + implementation "de.c1710:filemojicompat:1.0.18" testImplementation "androidx.test.ext:junit:1.1.2" testImplementation "org.robolectric:robolectric:4.4" @@ -168,4 +168,5 @@ dependencies { androidTestImplementation "androidx.test.espresso:espresso-core:3.3.0" androidTestImplementation "androidx.room:room-testing:$roomVersion" androidTestImplementation "androidx.test.ext:junit:1.1.2" + testImplementation "androidx.arch.core:core-testing:2.1.0" } diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 770d45af6..a4b29cf22 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -123,7 +123,7 @@ { val result = CropImage.getActivityResult(data) when (resultCode) { - Activity.RESULT_OK -> beginResize(result.uri) + Activity.RESULT_OK -> beginResize(result?.uriContent) CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE -> onResizeFailure() else -> endMediaPicking() } @@ -382,7 +382,12 @@ class EditProfileActivity : BaseActivity(), Injectable { } } - private fun beginResize(uri: Uri) { + private fun beginResize(uri: Uri?) { + if(uri == null) { + currentlyPicking = PickType.NOTHING + return + } + beginMediaPicking() when (currentlyPicking) { @@ -398,7 +403,6 @@ class EditProfileActivity : BaseActivity(), Injectable { } currentlyPicking = PickType.NOTHING - } private fun onResizeFailure() { diff --git a/app/src/main/res/layout/activity_license.xml b/app/src/main/res/layout/activity_license.xml index a8401f139..76a9dc5da 100644 --- a/app/src/main/res/layout/activity_license.xml +++ b/app/src/main/res/layout/activity_license.xml @@ -171,7 +171,7 @@ android:layout_marginStart="12dp" android:layout_marginTop="12dp" license:license="@string/license_apache_2" - license:link="https://github.com/ArthurHub/Android-Image-Cropper" + license:link="https://github.com/CanHub/Android-Image-Cropper" license:name="Android Image Cropper" />