@@ -80,7 +80,7 @@ const Messages = ({
8080 const opacity = useSharedValue ( 0 ) ;
8181 const hasScrolledToEnd = useRef ( false ) ;
8282 const animatedContainerStyle = useAnimatedStyle ( ( ) => ( {
83- opacity : opacity . value ,
83+ opacity : opacity . get ( ) ,
8484 } ) ) ;
8585
8686 // Re-arm the initial scroll when the chat history is cleared (e.g.
@@ -95,7 +95,7 @@ const Messages = ({
9595 hasScrolledToEnd . current
9696 ) {
9797 hasScrolledToEnd . current = false ;
98- opacity . value = 0 ;
98+ opacity . set ( 0 ) ;
9999 }
100100 prevChatLengthRef . current = chatHistory . length ;
101101 } , [ chatHistory . length , opacity ] ) ;
@@ -157,7 +157,7 @@ const Messages = ({
157157 lastUserHeight . current -
158158 lastAssistantHeight . current -
159159 CONTAINER_PADDING ;
160- blankSpace . value = Math . max ( 0 , raw ) ;
160+ blankSpace . set ( Math . max ( 0 , raw ) ) ;
161161 } , [ blankSpace ] ) ;
162162
163163 useImperativeHandle (
@@ -172,15 +172,15 @@ const Messages = ({
172172 // messages yet).
173173 if ( ! hasScrolledToEnd . current ) {
174174 hasScrolledToEnd . current = true ;
175- opacity . value = 1 ;
175+ opacity . set ( 1 ) ;
176176 }
177177 lastAssistantHeight . current = 0 ;
178178 lastUserHeight . current = 0 ;
179179 streamingActive . current = true ;
180180
181181 if ( Platform . OS === 'ios' ) {
182182 if ( containerHeight . current > 0 ) {
183- blankSpace . value = containerHeight . current ;
183+ blankSpace . set ( containerHeight . current ) ;
184184 }
185185 }
186186 pendingPinRef . current = true ;
@@ -257,7 +257,7 @@ const Messages = ({
257257 snap ( ) ;
258258 requestAnimationFrame ( ( ) => {
259259 snap ( ) ;
260- opacity . value = withTiming ( 1 , { duration : 350 } ) ;
260+ opacity . set ( withTiming ( 1 , { duration : 350 } ) ) ;
261261 } ) ;
262262 } , 16 ) ;
263263 } ) ;
@@ -275,9 +275,11 @@ const Messages = ({
275275 if ( pendingPinRef . current ) {
276276 pendingPinRef . current = false ;
277277 if ( Platform . OS !== 'ios' && containerHeight . current > 0 ) {
278- blankSpace . value = withTiming ( containerHeight . current , {
279- duration : 300 ,
280- } ) ;
278+ blankSpace . set (
279+ withTiming ( containerHeight . current , {
280+ duration : 300 ,
281+ } )
282+ ) ;
281283 }
282284 scrollRef . current ?. scrollToEnd ( { animated : true } ) ;
283285 }
0 commit comments