Commit e5f36c3e authored by Thomas's avatar Thomas
Browse files

switch lib

parent 5e619d7e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -8,11 +8,11 @@ plugins {
}
def flavor
android {
    compileSdk 32
    compileSdk 33

    defaultConfig {
        minSdk 21
        targetSdk 32
        targetSdk 33
        versionCode 451
        versionName "3.12.1"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -106,7 +106,7 @@ dependencies {


    implementation 'com.burhanrashid52:photoeditor:1.5.1'
    implementation project(path: ':cropper')
    implementation("com.vanniktech:android-image-cropper:4.3.3")
    annotationProcessor "com.github.bumptech.glide:compiler:4.12.0"
    implementation 'jp.wasabeef:glide-transformations:4.3.0'
    implementation 'com.github.penfeizhou.android.animation:glide-plugin:2.24.0'
+1 −1
Original line number Diff line number Diff line
@@ -213,7 +213,7 @@
            android:configChanges="keyboardHidden|orientation|screenSize"
            android:label="@string/scheduled" />
        <activity
            android:name="com.theartofdev.edmodo.cropper.CropImageActivity"
            android:name="com.canhub.cropper.CropImageActivity"
            android:theme="@style/Base.Theme.AppCompat" />


+1 −0
Original line number Diff line number Diff line
@@ -126,6 +126,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana
                                if (focusX != -2) {
                                    attachment.focus = focusX + "," + focusY;
                                }

                                composeAdapter.notifyItemChanged(position);
                                break;
                            }
+1 −1
Original line number Diff line number Diff line
@@ -251,7 +251,7 @@ public interface MastodonStatusesService {
            @Part MultipartBody.Part file,
            @Part MultipartBody.Part thumbnail,
            @Part("description") RequestBody description,
            @Part("focus") String focus
            @Part("focus") RequestBody focus
    );

    //Edit a Media
+34 −18
Original line number Diff line number Diff line
@@ -1243,6 +1243,20 @@ public class Helper {
                counter++;
                Date now = new Date();
                attachment.filename = formatter.format(now) + "." + extension;
                if (attachment.mimeType.startsWith("image")) {
                    try {
                        final File certCacheDir = new File(context.getCacheDir(), TEMP_MEDIA_DIRECTORY);
                        boolean isCertCacheDirExists = certCacheDir.exists();
                        if (!isCertCacheDirExists) {
                            certCacheDir.mkdirs();
                        }
                        String filePath = certCacheDir.getAbsolutePath() + "/" + attachment.filename;
                        MediaHelper.ResizedImageRequestBody(context, uri, filePath);
                        attachment.local_path = filePath;
                    } catch (IOException e) {
                        e.printStackTrace();
                    }
                } else {
                    InputStream selectedFileInputStream;
                    try {
                        selectedFileInputStream = context.getContentResolver().openInputStream(uri);
@@ -1269,6 +1283,8 @@ public class Helper {
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                }

                Handler mainHandler = new Handler(Looper.getMainLooper());
                Runnable myRunnable = () -> callBack.onAttachmentCopied(attachment);
                mainHandler.post(myRunnable);
Loading