From f170313f706d6ec992b02780a449f039900f2e51 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Fri, 3 Oct 2025 23:08:05 +0300 Subject: [PATCH] patch sonner-native to remove exit animations (#9092) --- patches/sonner-native+0.21.0.patch | 22 ++++++++++++++++++++++ patches/sonner-native+0.21.0.patch.md | 3 +++ 2 files changed, 25 insertions(+) create mode 100644 patches/sonner-native+0.21.0.patch create mode 100644 patches/sonner-native+0.21.0.patch.md diff --git a/patches/sonner-native+0.21.0.patch b/patches/sonner-native+0.21.0.patch new file mode 100644 index 0000000000..3fe7cc0aab --- /dev/null +++ b/patches/sonner-native+0.21.0.patch @@ -0,0 +1,22 @@ +diff --git a/node_modules/sonner-native/lib/commonjs/toast.js b/node_modules/sonner-native/lib/commonjs/toast.js +index 121816a..0c3c7bd 100644 +--- a/node_modules/sonner-native/lib/commonjs/toast.js ++++ b/node_modules/sonner-native/lib/commonjs/toast.js +@@ -264,7 +264,7 @@ const Toast = exports.Toast = /*#__PURE__*/React.forwardRef(({ + ...toastSwipeHandlerProps, + children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, { + entering: entering, +- exiting: exiting, ++ exiting: _reactNative.Platform.OS === 'android' ? undefined : exiting, + children: jsx + }) + }); +@@ -274,7 +274,7 @@ const Toast = exports.Toast = /*#__PURE__*/React.forwardRef(({ + children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, { + style: [unstyled ? undefined : elevationStyle, defaultStyles.toast, toastStyleCtx, styles?.toast, style, wiggleAnimationStyle], + entering: entering, +- exiting: exiting, ++ exiting: _reactNative.Platform.OS === 'android' ? undefined : exiting, + children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, { + style: [defaultStyles.toastContent, toastContentStyleCtx, styles?.toastContent], + children: [promiseOptions || variant === 'loading' ? 'loading' in icons ? icons.loading : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {}) : icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, { diff --git a/patches/sonner-native+0.21.0.patch.md b/patches/sonner-native+0.21.0.patch.md new file mode 100644 index 0000000000..0a7fbafcc4 --- /dev/null +++ b/patches/sonner-native+0.21.0.patch.md @@ -0,0 +1,3 @@ +# sonner-native+0.21.0.patch + +Removes Reanimated exit layout animations from the toasts. This was causing crashes if the toast was hidden while you were scrolling a flatlist.