Skip to content

Commit f170313

Browse files
authored
patch sonner-native to remove exit animations (#9092)
1 parent c8d0662 commit f170313

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

patches/sonner-native+0.21.0.patch

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/node_modules/sonner-native/lib/commonjs/toast.js b/node_modules/sonner-native/lib/commonjs/toast.js
2+
index 121816a..0c3c7bd 100644
3+
--- a/node_modules/sonner-native/lib/commonjs/toast.js
4+
+++ b/node_modules/sonner-native/lib/commonjs/toast.js
5+
@@ -264,7 +264,7 @@ const Toast = exports.Toast = /*#__PURE__*/React.forwardRef(({
6+
...toastSwipeHandlerProps,
7+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
8+
entering: entering,
9+
- exiting: exiting,
10+
+ exiting: _reactNative.Platform.OS === 'android' ? undefined : exiting,
11+
children: jsx
12+
})
13+
});
14+
@@ -274,7 +274,7 @@ const Toast = exports.Toast = /*#__PURE__*/React.forwardRef(({
15+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
16+
style: [unstyled ? undefined : elevationStyle, defaultStyles.toast, toastStyleCtx, styles?.toast, style, wiggleAnimationStyle],
17+
entering: entering,
18+
- exiting: exiting,
19+
+ exiting: _reactNative.Platform.OS === 'android' ? undefined : exiting,
20+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
21+
style: [defaultStyles.toastContent, toastContentStyleCtx, styles?.toastContent],
22+
children: [promiseOptions || variant === 'loading' ? 'loading' in icons ? icons.loading : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {}) : icon ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# sonner-native+0.21.0.patch
2+
3+
Removes Reanimated exit layout animations from the toasts. This was causing crashes if the toast was hidden while you were scrolling a flatlist.

0 commit comments

Comments
 (0)