File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
package/src/components/Message/MessageSimple Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ export const SwipableMessageBubble = React.memo(
107107
108108 const setMessageContentWidth = useStableCallback ( ( valueOrCallback : SetStateAction < number > ) => {
109109 if ( typeof valueOrCallback === 'number' ) {
110- props . setMessageContentWidth ( Math . round ( valueOrCallback ) ) ;
110+ props . setMessageContentWidth ( Math . ceil ( valueOrCallback ) ) ;
111111 return ;
112112 }
113113 props . setMessageContentWidth ( valueOrCallback ) ;
@@ -175,13 +175,13 @@ export const SwipableMessageBubble = React.memo(
175175 ) ;
176176 } ) ,
177177 [
178- isSwiping ,
179178 messageSwipeToReplyHitSlop ,
180- onSwipe ,
181179 touchStart ,
180+ isSwiping ,
181+ shouldRenderSwipeableWrapper ,
182182 translateX ,
183+ onSwipe ,
183184 triggerHaptic ,
184- shouldRenderSwipeableWrapper ,
185185 ] ,
186186 ) ;
187187
@@ -200,7 +200,9 @@ export const SwipableMessageBubble = React.memo(
200200 style = { [
201201 styles . contentWrapper ,
202202 contentWrapper ,
203- props . messageContentWidth > 0 ? { width : props . messageContentWidth } : { } ,
203+ props . messageContentWidth > 0 && shouldRenderAnimatedWrapper
204+ ? { width : props . messageContentWidth }
205+ : { } ,
204206 ] }
205207 >
206208 { shouldRenderAnimatedWrapper ? (
You can’t perform that action at this time.
0 commit comments