I have two functions:
我有两个功能:
setCallModalFalse = (incomingFlag) => () => {
if (incomingFlag === 'EmergencyCall') {
this.setState({ callModal: false });
this.props.navigation.navigate('EmergencyCall');
} else {
loggingService.debug('we are not going anywhere');
this.setState({ callModal: false });
}
}
setBeepModalFalse = (incomingFlag) => () => {
if (incomingFlag === 'PoliceIconPage') {
this.setState({ beepModal: false });
this.props.navigation.navigate('PoliceIconPage');
} else {
loggingService.debug('hey you pressed setbeepmodalfalse');
this.setState({ beepModal: false });
}
setCallModal