react-native-morph-card 0.1.6 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -384,7 +384,10 @@ class MorphCardSourceView(context: Context) : ReactViewGroup(context) {
384
384
 
385
385
  // PixelCopy captures from the surface (hardware-rendered, preserves outlines).
386
386
  // We use a background HandlerThread for the callback to avoid deadlocking main.
387
- val window = (context as? android.app.Activity)?.window
387
+ // Note: context may be ThemedReactContext, not Activity directly.
388
+ val activity = (context as? android.app.Activity)
389
+ ?: (context as? com.facebook.react.bridge.ReactContext)?.currentActivity
390
+ val window = activity?.window
388
391
  if (window != null) {
389
392
  val blockerBitmap = Bitmap.createBitmap(decorView.width, decorView.height, Bitmap.Config.ARGB_8888)
390
393
  val copyThread = android.os.HandlerThread("PixelCopyThread")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-morph-card",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "Native card-to-modal morph transition for React Native. iOS App Store-style expand animation.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",