File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,11 @@ import {
2121 Text ,
2222 matchFont ,
2323} from '@shopify/react-native-skia' ;
24- import { useSharedValue , useDerivedValue } from 'react-native-reanimated' ;
24+ import {
25+ useSharedValue ,
26+ useDerivedValue ,
27+ withTiming ,
28+ } from 'react-native-reanimated' ;
2529import { PendingOutline } from '../web/outline' ;
2630
2731export const genId = ( ) : string => {
@@ -299,7 +303,14 @@ export const ReactNativeScanEntryPoint = () => {
299303const ReactNativeScan = ( { id : _ } : { id : string } ) => {
300304 const { width, height } = Dimensions . get ( 'window' ) ;
301305 const outlines = useSyncExternalStore (
302- ( listener ) => ReactScanInternals . subscribe ( 'activeOutlines' , listener ) ,
306+ ( listener ) =>
307+ ReactScanInternals . subscribe ( 'activeOutlines' , ( value ) => {
308+ opacity . value = 1 ;
309+ opacity . value = withTiming ( 0 , {
310+ duration : 300 ,
311+ } ) ;
312+ listener ( ) ;
313+ } ) ,
303314 ( ) => ReactScanInternals . activeOutlines ,
304315 ) ;
305316 const opacity = useSharedValue ( 1 ) ;
You can’t perform that action at this time.
0 commit comments