react-native-swipeable-actions 0.1.2 → 0.1.3
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.
|
@@ -914,6 +914,15 @@ class SwipeableView(context: Context, appContext: AppContext) : ExpoView(context
|
|
|
914
914
|
))
|
|
915
915
|
}
|
|
916
916
|
|
|
917
|
+
override fun onAttachedToWindow() {
|
|
918
|
+
super.onAttachedToWindow()
|
|
919
|
+
// Re-register in the view registry after reattach (e.g. returning from navigation).
|
|
920
|
+
// onDetachedFromWindow unregisters the view, but the recyclingKey prop setter
|
|
921
|
+
// short-circuits when the value hasn't changed, so the view is never re-registered
|
|
922
|
+
// unless we do it here.
|
|
923
|
+
recyclingKey?.let { registerView(this, it) }
|
|
924
|
+
}
|
|
925
|
+
|
|
917
926
|
override fun onDetachedFromWindow() {
|
|
918
927
|
super.onDetachedFromWindow()
|
|
919
928
|
stopProgressUpdates()
|
package/ios/SwipeableView.swift
CHANGED
|
@@ -275,6 +275,14 @@ public class SwipeableView: ExpoView {
|
|
|
275
275
|
super.didMoveToWindow()
|
|
276
276
|
guard window != nil else { return }
|
|
277
277
|
|
|
278
|
+
// Re-register in the view registry after reattach (e.g. returning from navigation).
|
|
279
|
+
// willMove(toSuperview: nil) unregisters the view, but the recyclingKey prop setter
|
|
280
|
+
// short-circuits when the value hasn't changed, so the view is never re-registered
|
|
281
|
+
// unless we do it here.
|
|
282
|
+
if let key = recyclingKey {
|
|
283
|
+
Self.registerView(self, for: key)
|
|
284
|
+
}
|
|
285
|
+
|
|
278
286
|
// Ensure gesture is attached to this view (handles view hierarchy changes)
|
|
279
287
|
if panGesture.view !== self {
|
|
280
288
|
panGesture.view?.removeGestureRecognizer(panGesture)
|
package/package.json
CHANGED