Page MenuHomePhabricator

D9100.id30848.diff
No OneTemporary

D9100.id30848.diff

diff --git a/native/chat/swipeable-thread.react.js b/native/chat/swipeable-thread.react.js
--- a/native/chat/swipeable-thread.react.js
+++ b/native/chat/swipeable-thread.react.js
@@ -79,16 +79,20 @@
iconSize,
]);
- return (
- <Swipeable
- buttonWidth={60}
- innerRef={swipeable}
- onSwipeableRightWillOpen={onSwipeableRightWillOpen}
- rightActions={swipeableActions}
- >
- {props.children}
- </Swipeable>
+ const swipeableThread = React.useMemo(
+ () => (
+ <Swipeable
+ buttonWidth={60}
+ innerRef={swipeable}
+ onSwipeableRightWillOpen={onSwipeableRightWillOpen}
+ rightActions={swipeableActions}
+ >
+ {props.children}
+ </Swipeable>
+ ),
+ [onSwipeableRightWillOpen, props.children, swipeableActions],
);
+ return swipeableThread;
}
export default SwipeableThread;

File Metadata

Mime Type
text/plain
Expires
Tue, Dec 3, 2:50 AM (22 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2609382
Default Alt Text
D9100.id30848.diff (883 B)

Event Timeline