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,6 +98,11 @@ export const SelectionHeader = ({navigation}) => {
justifyContent: 'space-between', justifyContent: 'space-between',
alignItems: 'center', alignItems: 'center',
}}> }}>
<TouchableOpacity
onPress={() => {
dispatch({type: ACTIONS.SELECTION_MODE, enabled: false});
eSendEvent(eOpenMoveNoteDialog);
}}>
<Icon <Icon
style={{ style={{
paddingLeft: 25, paddingLeft: 25,
@@ -104,6 +111,9 @@ export const SelectionHeader = ({navigation}) => {
name={'plus'} name={'plus'}
size={SIZE.xl} size={SIZE.xl}
/> />
</TouchableOpacity>
<TouchableOpacity>
<Icon <Icon
style={{ style={{
paddingLeft: 25, paddingLeft: 25,
@@ -112,7 +122,9 @@ export const SelectionHeader = ({navigation}) => {
name={'star'} name={'star'}
size={SIZE.xl - 3} size={SIZE.xl - 3}
/> />
</TouchableOpacity>
<TouchableOpacity>
<Icon <Icon
style={{ style={{
paddingLeft: 25, paddingLeft: 25,
@@ -121,6 +133,7 @@ export const SelectionHeader = ({navigation}) => {
name={'delete'} name={'delete'}
size={SIZE.xl - 3} size={SIZE.xl - 3}
/> />
</TouchableOpacity>
</View> </View>
</View> </View>
</Animatable.View> </Animatable.View>