Skip to content

Instantly share code, notes, and snippets.

@lncitador
Last active November 3, 2025 02:48
Show Gist options
  • Select an option

  • Save lncitador/221577e9b132d5468aa5b37f75b682fa to your computer and use it in GitHub Desktop.

Select an option

Save lncitador/221577e9b132d5468aa5b37f75b682fa to your computer and use it in GitHub Desktop.
Patch for react-native-blurhash@2.1.2 - Fix Kotlin compilation error: Return type mismatch in getExportedCustomDirectEventTypeConstants()
diff --git a/node_modules/react-native-blurhash/android/src/main/java/com/mrousavy/blurhash/BlurhashViewManager.kt b/node_modules/react-native-blurhash/android/src/main/java/com/mrousavy/blurhash/BlurhashViewManager.kt
index 0000000..1111111 100644
--- a/node_modules/react-native-blurhash/android/src/main/java/com/mrousavy/blurhash/BlurhashViewManager.kt
+++ b/node_modules/react-native-blurhash/android/src/main/java/com/mrousavy/blurhash/BlurhashViewManager.kt
@@ -109,6 +109,7 @@ class BlurhashViewManager :
override fun getExportedCustomDirectEventTypeConstants(): MutableMap<String, Any>? {
return MapBuilder.builder<String, Any>()
.put(LoadErrorEvent.EVENT_NAME, MapBuilder.of("registrationName", "onLoadError"))
.put(LoadStartEvent.EVENT_NAME, MapBuilder.of("registrationName", "onLoadStart"))
.put(LoadEndEvent.EVENT_NAME, MapBuilder.of("registrationName", "onLoadEnd"))
.build()
+ .toMutableMap()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment