From aab6293c49362d7d47758cf00583a8a212de49db Mon Sep 17 00:00:00 2001 From: Roland Osborne Date: Fri, 14 Mar 2025 14:28:36 -0700 Subject: [PATCH] fixing animated gif support --- app/client/mobile/android/app/build.gradle | 5 ++++- app/client/mobile/android/build.gradle | 2 +- app/client/mobile/src/conversation/useConversation.hook.ts | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/client/mobile/android/app/build.gradle b/app/client/mobile/android/app/build.gradle index be90d64e..9790ac07 100644 --- a/app/client/mobile/android/app/build.gradle +++ b/app/client/mobile/android/app/build.gradle @@ -89,7 +89,7 @@ android { applicationId "com.databag" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 1125 + versionCode 1145 versionName "1.5" } signingConfigs { @@ -114,6 +114,9 @@ android { dependencies { // The version of react-native is set by the React Native Gradle Plugin implementation("com.facebook.react:react-android") + implementation 'com.facebook.fresco:animated-gif:3.2.0' + implementation 'com.facebook.fresco:animated-webp:3.2.0' + implementation 'com.facebook.fresco:webpsupport:3.2.0' if (hermesEnabled.toBoolean()) { implementation("com.facebook.react:hermes-android") diff --git a/app/client/mobile/android/build.gradle b/app/client/mobile/android/build.gradle index 7a1cd3ee..86467d3f 100644 --- a/app/client/mobile/android/build.gradle +++ b/app/client/mobile/android/build.gradle @@ -1,7 +1,7 @@ buildscript { ext { buildToolsVersion = "34.0.0" - minSdkVersion = 24 + minSdkVersion = 34 compileSdkVersion = 34 targetSdkVersion = 34 ndkVersion = "26.1.10909125" diff --git a/app/client/mobile/src/conversation/useConversation.hook.ts b/app/client/mobile/src/conversation/useConversation.hook.ts index 4a279e85..5d9c472a 100644 --- a/app/client/mobile/src/conversation/useConversation.hook.ts +++ b/app/client/mobile/src/conversation/useConversation.hook.ts @@ -19,7 +19,7 @@ async function getImageThumb(path: string, type: string, size: number) { if (size < IMAGE_SCALE_SIZE) { const type = await fileType(path); const base = await RNFS.readFile(path, 'base64') - return `data:image/{type.ext};base64,${base}`; + return `data:image/${type.ext};base64,${base}`; } else { const thumb = await ImageResizer.createResizedImage(path, 192, 192, "JPEG", 50, 0, null); const base = await RNFS.readFile(thumb.path, 'base64')