Compare commits

..

2 commits

Author SHA1 Message Date
Arnaud Vergnet
aac598a94a Fix animation error 2021-05-10 21:34:15 +02:00
Arnaud Vergnet
d3a48d95c3 Fix group selection 2021-05-10 21:34:07 +02:00
2 changed files with 14 additions and 13 deletions

View file

@ -30,8 +30,6 @@ import { StackNavigationProp } from '@react-navigation/stack';
import AutoHideHandler from '../../utils/AutoHideHandler'; import AutoHideHandler from '../../utils/AutoHideHandler';
import { TAB_BAR_HEIGHT } from '../Tabbar/CustomTabBar'; import { TAB_BAR_HEIGHT } from '../Tabbar/CustomTabBar';
const AnimatedFAB = Animatable.createAnimatableComponent(FAB);
type PropsType = { type PropsType = {
navigation: StackNavigationProp<any>; navigation: StackNavigationProp<any>;
theme: ReactNativePaper.Theme; theme: ReactNativePaper.Theme;
@ -164,16 +162,19 @@ class AnimatedBottomBar extends React.Component<PropsType, StateType> {
> >
<Surface style={styles.surface}> <Surface style={styles.surface}>
<View style={styles.fabContainer}> <View style={styles.fabContainer}>
<AnimatedFAB <Animatable.View
animation={props.seekAttention ? 'bounce' : undefined}
easing="ease-out"
iterationDelay={500}
iterationCount="infinite"
useNativeDriver
style={styles.fab} style={styles.fab}
icon="account-clock" animation={props.seekAttention ? 'bounce' : undefined}
onPress={() => props.navigation.navigate('group-select')} easing={'ease-out'}
/> iterationDelay={500}
iterationCount={'infinite'}
useNativeDriver={true}
>
<FAB
icon={'account-clock'}
onPress={() => props.navigation.navigate('group-select')}
/>
</Animatable.View>
</View> </View>
<View style={styles.side}> <View style={styles.side}>
<IconButton <IconButton

View file

@ -190,7 +190,7 @@ function PlanexScreen(props: Props) {
navigation.dispatch(CommonActions.setParams({ group: undefined })); navigation.dispatch(CommonActions.setParams({ group: undefined }));
} }
// eslint-disable-next-line react-hooks/exhaustive-deps // eslint-disable-next-line react-hooks/exhaustive-deps
}, []) }, [props.route.params])
); );
/** /**
* Gets the Webview, with an error view on top if no group is selected. * Gets the Webview, with an error view on top if no group is selected.
@ -388,7 +388,7 @@ function PlanexScreen(props: Props) {
navigation={navigation} navigation={navigation}
ref={barRef} ref={barRef}
onPress={sendMessage} onPress={sendMessage}
seekAttention={currentGroup !== undefined} seekAttention={currentGroup === undefined}
/> />
</View> </View>
); );