fix crop lib compatibility issues

This commit is contained in:
kosyak 2023-12-18 04:24:49 +01:00
parent 73bc3c2617
commit db27258c18
2 changed files with 4 additions and 5 deletions

View file

@ -47,7 +47,7 @@ dependencies {
conversationsPlaystoreImplementation("com.android.installreferrer:installreferrer:2.2") conversationsPlaystoreImplementation("com.android.installreferrer:installreferrer:2.2")
quicksyPlaystoreImplementation 'com.google.android.gms:play-services-auth-api-phone:18.0.1' quicksyPlaystoreImplementation 'com.google.android.gms:play-services-auth-api-phone:18.0.1'
implementation 'com.github.open-keychain.open-keychain:openpgp-api:v5.7.1' implementation 'com.github.open-keychain.open-keychain:openpgp-api:v5.7.1'
implementation("com.github.CanHub:Android-Image-Cropper:2.0.0") implementation("com.github.CanHub:Android-Image-Cropper:2.2.0")
implementation 'androidx.appcompat:appcompat:1.6.1' implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.exifinterface:exifinterface:1.3.6' implementation 'androidx.exifinterface:exifinterface:1.3.6'
implementation 'androidx.cardview:cardview:1.0.0' implementation 'androidx.cardview:cardview:1.0.0'
@ -99,7 +99,6 @@ dependencies {
implementation 'com.github.kizitonwose.colorpreference:support:1.1.0' implementation 'com.github.kizitonwose.colorpreference:support:1.1.0'
implementation 'com.caverock:androidsvg-aar:1.4' implementation 'com.caverock:androidsvg-aar:1.4'
implementation 'com.github.singpolyma:Better-Link-Movement-Method:4df081e1e4' implementation 'com.github.singpolyma:Better-Link-Movement-Method:4df081e1e4'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
} }
ext { ext {

View file

@ -23,8 +23,8 @@ import com.bumptech.glide.load.engine.GlideException
import com.bumptech.glide.request.RequestListener import com.bumptech.glide.request.RequestListener
import com.bumptech.glide.request.RequestOptions import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.request.target.Target import com.bumptech.glide.request.target.Target
import com.canhub.cropper.CropImageView
import com.leinardi.android.speeddial.UiUtils.getPrimaryColor import com.leinardi.android.speeddial.UiUtils.getPrimaryColor
import com.theartofdev.edmodo.cropper.CropImageView
import com.zomato.photofilters.FilterPack import com.zomato.photofilters.FilterPack
import com.zomato.photofilters.imageprocessors.Filter import com.zomato.photofilters.imageprocessors.Filter
import eu.siacs.conversations.R import eu.siacs.conversations.R
@ -663,11 +663,11 @@ class EditActivity : AppCompatActivity(), CropImageView.OnCropImageCompleteListe
if (result.error == null) { if (result.error == null) {
setOldExif() setOldExif()
val bitmap = result.bitmap val bitmap = result.bitmap ?: return
saveBitmapToFile(bitmap, true) saveBitmapToFile(bitmap, true)
} else { } else {
toast("${getString(R.string.image_editing_failed)}: ${result.error.message}") toast("${getString(R.string.image_editing_failed)}: ${result.error?.message}")
} }
} }