File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
src/components/floatingButton Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,6 @@ class FloatingButton extends PureComponent<FloatingButtonProps> {
64
64
this . firstLoad = true ;
65
65
}
66
66
67
- componentDidMount ( ) {
68
- this . firstLoad = false ;
69
- }
70
-
71
67
onAnimationEnd = ( ) => {
72
68
this . setState ( { animating : false } ) ;
73
69
} ;
@@ -117,6 +113,9 @@ class FloatingButton extends PureComponent<FloatingButtonProps> {
117
113
const { withoutAnimation, secondaryButton, visible} = this . props ;
118
114
const Container = ! withoutAnimation ? AnimatableView : View ;
119
115
116
+ // NOTE: keep this.firstLoad as true as long as the visibility changed to true
117
+ this . firstLoad && ! visible ? this . firstLoad = true : this . firstLoad = false ;
118
+
120
119
// NOTE: On first load, don't show if it should not be visible
121
120
if ( this . firstLoad === true && ! this . initialVisibility ) {
122
121
return false ;
You can’t perform that action at this time.
0 commit comments