fix crash

This commit is contained in:
ammarahm-ed
2020-02-20 12:16:32 +05:00
parent 7fbc0278dc
commit cb2d325717

View File

@@ -13,6 +13,8 @@ import {SIZE, WEIGHT} from '../../common/common';
import {useTracked} from '../../provider'; import {useTracked} from '../../provider';
import {ACTIONS} from '../../provider/actions'; import {ACTIONS} from '../../provider/actions';
import {w} from '../../utils/utils'; import {w} from '../../utils/utils';
import {eSendEvent} from '../../services/eventManager';
import {eOpenMoveNoteDialog} from '../../services/events';
export const AnimatedSafeAreaView = Animatable.createAnimatableComponent( export const AnimatedSafeAreaView = Animatable.createAnimatableComponent(
SafeAreaView, SafeAreaView,
@@ -76,7 +78,7 @@ export const SelectionHeader = ({navigation}) => {
}} }}
color={colors.pri} color={colors.pri}
name={'chevron-left'} name={'chevron-left'}
size={SIZE.xxxl - 3} size={SIZE.xxxl}
/> />
</TouchableOpacity> </TouchableOpacity>
<Text <Text
@@ -96,31 +98,42 @@ export const SelectionHeader = ({navigation}) => {
justifyContent: 'space-between', justifyContent: 'space-between',
alignItems: 'center', alignItems: 'center',
}}> }}>
<Icon <TouchableOpacity
style={{ onPress={() => {
paddingLeft: 25, dispatch({type: ACTIONS.SELECTION_MODE, enabled: false});
}} eSendEvent(eOpenMoveNoteDialog);
color={colors.accent} }}>
name={'plus'} <Icon
size={SIZE.xl} style={{
/> paddingLeft: 25,
<Icon }}
style={{ color={colors.accent}
paddingLeft: 25, name={'plus'}
}} size={SIZE.xl}
color={colors.accent} />
name={'star'} </TouchableOpacity>
size={SIZE.xl - 3}
/>
<Icon <TouchableOpacity>
style={{ <Icon
paddingLeft: 25, style={{
}} paddingLeft: 25,
color={colors.errorText} }}
name={'delete'} color={colors.accent}
size={SIZE.xl - 3} name={'star'}
/> size={SIZE.xl - 3}
/>
</TouchableOpacity>
<TouchableOpacity>
<Icon
style={{
paddingLeft: 25,
}}
color={colors.errorText}
name={'delete'}
size={SIZE.xl - 3}
/>
</TouchableOpacity>
</View> </View>
</View> </View>
</Animatable.View> </Animatable.View>