Loading app/build.gradle +3 −3 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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' Loading app/src/main/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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" /> Loading app/src/main/java/app/fedilab/android/activities/ComposeActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana if (focusX != -2) { attachment.focus = focusX + "," + focusY; } composeAdapter.notifyItemChanged(position); break; } Loading app/src/main/java/app/fedilab/android/client/endpoints/MastodonStatusesService.java +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading app/src/main/java/app/fedilab/android/helper/Helper.java +34 −18 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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 Loading
app/build.gradle +3 −3 Original line number Diff line number Diff line Loading @@ -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" Loading Loading @@ -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' Loading
app/src/main/AndroidManifest.xml +1 −1 Original line number Diff line number Diff line Loading @@ -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" /> Loading
app/src/main/java/app/fedilab/android/activities/ComposeActivity.java +1 −0 Original line number Diff line number Diff line Loading @@ -126,6 +126,7 @@ public class ComposeActivity extends BaseActivity implements ComposeAdapter.Mana if (focusX != -2) { attachment.focus = focusX + "," + focusY; } composeAdapter.notifyItemChanged(position); break; } Loading
app/src/main/java/app/fedilab/android/client/endpoints/MastodonStatusesService.java +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
app/src/main/java/app/fedilab/android/helper/Helper.java +34 −18 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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