deer social fork for personal usage. but you might see a use idk. github mirror

patch sonner-native to remove exit animations (#9092)

authored by samuel.fm and committed by GitHub f170313f c8d06626

+22
patches/sonner-native+0.21.0.patch
··· 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, {
+3
patches/sonner-native+0.21.0.patch.md
··· 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.