diff options
author | Hailey <me@haileyok.com> | 2024-12-06 09:52:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-06 17:52:08 +0000 |
commit | 1f6acc11abec91972e6e04abd55e09b2a9dc1433 (patch) | |
tree | 3d6a9b1e8a3aa6f06a4700e9b40519439fcb37da /modules | |
parent | 3ab6c435df5dc3d17fe3e2531231ccf012a4860c (diff) | |
download | voidsky-1f6acc11abec91972e6e04abd55e09b2a9dc1433.tar.zst |
clean rn 0.76 upgrade (#6887)
* package upgrades * upgrade system ui * update patches * rename patch * rm * use .set/.set * resolve yarnlock * fix accidentally removed package * fix use permissions hook * fix some type errors * type fixes * more tweaking * clean * Discard changes to src/screens/Onboarding/StepProfile/index.tsx * oops * fix splash * use ios/android in config * Fix tests * add back patch * add to rn patch * fullscreen? * Revert "add to rn patch" This reverts commit 4716d2c643a29fc77b871ca8555d8d78cb4ac427. * try this * test with revert * test * maybe this * fix config * Bump @react-native-picker/picker * Bump some packages * Rm unused * Update lockfile * Rename expo-notifications+0.29.8.patch.md to expo-notifications+0.29.10.patch.md * Update react-native+0.76.3.patch.md * Update react-native+0.76.3.patch.md * Inline splash configs Jumping around the file is annoying and makes it harder to understand how this is structured. * Start fixing Android splash * Downgrade compressor This version isn't building for me due to https://github.com/numandev1/react-native-compressor/issues/322. * Make Android splash empty for now * Work around a bug * Bump the compressor * Bump again * Include splash fixes * Try updating * No custom Android splash * Revert to using icons * welp * Fix sizes * Make sizing work * Bump size --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'modules')
-rw-r--r-- | modules/expo-bluesky-gif-view/android/build.gradle | 2 | ||||
-rw-r--r-- | modules/expo-bluesky-gif-view/android/src/main/java/expo/modules/blueskygifview/GifView.kt | 126 |
2 files changed, 64 insertions, 64 deletions
diff --git a/modules/expo-bluesky-gif-view/android/build.gradle b/modules/expo-bluesky-gif-view/android/build.gradle index c209a35ae..bbd801343 100644 --- a/modules/expo-bluesky-gif-view/android/build.gradle +++ b/modules/expo-bluesky-gif-view/android/build.gradle @@ -88,7 +88,7 @@ repositories { dependencies { implementation 'androidx.appcompat:appcompat:1.6.1' - def GLIDE_VERSION = "4.13.2" + def GLIDE_VERSION = "4.16.0" implementation project(':expo-modules-core') implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:${getKotlinVersion()}" diff --git a/modules/expo-bluesky-gif-view/android/src/main/java/expo/modules/blueskygifview/GifView.kt b/modules/expo-bluesky-gif-view/android/src/main/java/expo/modules/blueskygifview/GifView.kt index 5e467a160..6c93981a1 100644 --- a/modules/expo-bluesky-gif-view/android/src/main/java/expo/modules/blueskygifview/GifView.kt +++ b/modules/expo-bluesky-gif-view/android/src/main/java/expo/modules/blueskygifview/GifView.kt @@ -5,6 +5,7 @@ import android.graphics.Color import android.graphics.drawable.Animatable import android.graphics.drawable.Drawable import com.bumptech.glide.Glide +import com.bumptech.glide.load.DataSource import com.bumptech.glide.load.engine.DiskCacheStrategy import com.bumptech.glide.load.engine.GlideException import com.bumptech.glide.request.RequestListener @@ -15,8 +16,8 @@ import expo.modules.kotlin.viewevent.EventDispatcher import expo.modules.kotlin.views.ExpoView class GifView( - context: Context, - appContext: AppContext, + context: Context, + appContext: AppContext, ) : ExpoView(context, appContext) { // Events private val onPlayerStateChange by EventDispatcher() @@ -81,66 +82,65 @@ class GifView( } this.webpRequest = - glide - .load(source) - .diskCacheStrategy(DiskCacheStrategy.DATA) - .skipMemoryCache(false) - .listener( - object : RequestListener<Drawable> { - override fun onResourceReady( - resource: Drawable?, - model: Any?, - target: Target<Drawable>?, - dataSource: com.bumptech.glide.load.DataSource?, - isFirstResource: Boolean, - ): Boolean { - if (placeholderRequest != null) { - glide.clear(placeholderRequest) - } - return false - } - - override fun onLoadFailed( - e: GlideException?, - model: Any?, - target: Target<Drawable>?, - isFirstResource: Boolean, - ): Boolean = true - }, - ).into(this.imageView) + glide.load(source) + .diskCacheStrategy(DiskCacheStrategy.DATA) + .skipMemoryCache(false) + .listener( + object : RequestListener<Drawable> { + override fun onResourceReady( + resource: Drawable, + model: Any, + target: Target<Drawable>?, + dataSource: DataSource, + isFirstResource: Boolean + ): Boolean { + placeholderRequest?.let { glide.clear(it) } + return false + } + + override fun onLoadFailed( + e: GlideException?, + model: Any?, + target: Target<Drawable>, + isFirstResource: Boolean + ): Boolean = true + } + ) + .into(this.imageView) if (this.imageView.drawable == null || this.imageView.drawable !is Animatable) { this.placeholderRequest = - glide - .load(placeholderSource) - .diskCacheStrategy(DiskCacheStrategy.DATA) - // Let's not bloat the memory cache with placeholders - .skipMemoryCache(true) - .listener( - object : RequestListener<Drawable> { - override fun onResourceReady( - resource: Drawable?, - model: Any?, - target: Target<Drawable>?, - dataSource: com.bumptech.glide.load.DataSource?, - isFirstResource: Boolean, - ): Boolean { - // Incase this request finishes after the webp, let's just not set - // the drawable. This shouldn't happen because the request should get cancelled - if (imageView.drawable == null) { - imageView.setImageDrawable(resource) - } - return true - } - - override fun onLoadFailed( - e: GlideException?, - model: Any?, - target: Target<Drawable>?, - isFirstResource: Boolean, - ): Boolean = true - }, - ).submit() + glide.load(placeholderSource) + .diskCacheStrategy(DiskCacheStrategy.DATA) + // Let's not bloat the memory cache with placeholders + .skipMemoryCache(true) + .listener( + object : RequestListener<Drawable> { + override fun onResourceReady( + resource: Drawable, + model: Any, + target: Target<Drawable>?, + dataSource: DataSource, + isFirstResource: Boolean + ): Boolean { + // Incase this request finishes after the webp, let's just not set + // the drawable. This shouldn't happen because the request should + // get cancelled + if (imageView.drawable == null) { + imageView.setImageDrawable(resource) + } + return true + } + + override fun onLoadFailed( + e: GlideException?, + model: Any?, + target: Target<Drawable>, + isFirstResource: Boolean + ): Boolean = true + }, + ) + .submit() } } @@ -174,10 +174,10 @@ class GifView( fun firePlayerStateChange() { onPlayerStateChange( - mapOf( - "isPlaying" to this.isPlaying, - "isLoaded" to this.isLoaded, - ), + mapOf( + "isPlaying" to this.isPlaying, + "isLoaded" to this.isLoaded, + ), ) } |