Commit 02e65cd1 authored by Thomas's avatar Thomas
Browse files

- Fix #1332 - Add setting to allow uncompressed media upload (default disabled)

parent f3c00efc
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1408,7 +1408,9 @@ public class Helper {
                Date now = new Date();
                attachment.filename = formatter.format(now) + "." + extension;
                Set<String> imageType = new HashSet<>(Arrays.asList("image/png", "image/jpeg", "image/jpg"));
                if (imageType.contains(attachment.mimeType)) {
                SharedPreferences sharedpreferences = PreferenceManager.getDefaultSharedPreferences(context);
                boolean compressImages = sharedpreferences.getBoolean(context.getString(R.string.SET_PICTURE_COMPRESSED), false);
                if (compressImages && imageType.contains(attachment.mimeType)) {
                    final File certCacheDir = new File(context.getCacheDir(), TEMP_MEDIA_DIRECTORY);
                    boolean isCertCacheDirExists = certCacheDir.exists();
                    if (!isCertCacheDirExists) {
+0 −10
Original line number Diff line number Diff line
@@ -41,7 +41,6 @@
        app:summary="@string/set_mention_booster_indication"
        app:title="@string/set_mention_booster" />

    <!--
    <SwitchPreferenceCompat
        app:defaultValue="false"
        app:iconSpaceReserved="false"
@@ -49,15 +48,6 @@
        app:singleLineTitle="false"
        app:summary="@string/set_resize_picture_indication"
        app:title="@string/set_resize_picture" />

    <SwitchPreferenceCompat
        app:defaultValue="false"
        app:iconSpaceReserved="false"
        app:key="@string/SET_VIDEO_COMPRESSED"
        app:singleLineTitle="false"
        app:summary="@string/set_resize_video_indication"
        app:title="@string/set_resize_video" />
    -->
    <SwitchPreferenceCompat
        app:defaultValue="true"
        app:iconSpaceReserved="false"