Skip to content

Commit

Permalink
Add HARDWARE_BACK_PRESS const
Browse files Browse the repository at this point in the history
  • Loading branch information
rickycodes committed Dec 11, 2020
1 parent 278fabe commit b76e4c4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/components/Views/ManualBackupStep3/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ const styles = StyleSheet.create({
});

const hardwareBackPress = () => ({});
const HARDWARE_BACK_PRESS = 'hardwareBackPress';

/**
* View that's shown during the last step of
Expand Down Expand Up @@ -93,7 +94,7 @@ class ManualBackupStep3 extends PureComponent {
};

componentWillUnmount = () => {
BackHandler.removeEventListener('hardwareBackPress', hardwareBackPress);
BackHandler.removeEventListener(HARDWARE_BACK_PRESS, hardwareBackPress);
};

componentDidMount = async () => {
Expand All @@ -103,7 +104,7 @@ class ManualBackupStep3 extends PureComponent {
this.setState({
hintText: manualBackup
});
BackHandler.addEventListener('hardwareBackPress', hardwareBackPress);
BackHandler.addEventListener(HARDWARE_BACK_PRESS, hardwareBackPress);
};

toggleHint = () => {
Expand Down

0 comments on commit b76e4c4

Please sign in to comment.