File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -175,9 +175,11 @@ export default function GameScreen() {
175175 }
176176 } , [ gameState . isShowingResult ] ) ;
177177
178- // FAB entrance animation
178+ // FAB entrance animation — only on first appearance
179+ const fabHasAnimated = useRef ( false ) ;
179180 useEffect ( ( ) => {
180- if ( ! isLoading && ! miniMapShown && ! gameState . isShowingResult ) {
181+ if ( ! isLoading && ! miniMapShown && ! gameState . isShowingResult && ! fabHasAnimated . current ) {
182+ fabHasAnimated . current = true ;
181183 fabScaleAnim . setValue ( 0 ) ;
182184 Animated . spring ( fabScaleAnim , {
183185 toValue : 1 ,
@@ -531,7 +533,7 @@ export default function GameScreen() {
531533 {
532534 transform : [ { scale : fabScaleAnim } ] ,
533535 bottom : Math . max ( insets . bottom , 20 ) + 20 ,
534- right : Math . max ( insets . right , 20 ) ,
536+ right : Math . max ( insets . right , 60 ) ,
535537 } ,
536538 ] }
537539 >
You can’t perform that action at this time.
0 commit comments