Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit f6781d1

Browse files
committed
Fix splash screen hang when press back
- Fix issue #1269
1 parent a326c9b commit f6781d1

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/view/pin-mobile.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React from 'react';
2-
import { View, StyleSheet } from 'react-native';
2+
import { View, StyleSheet, BackHandler } from 'react-native';
33
import { observer } from 'mobx-react';
44
import PropTypes from 'prop-types';
55
import Background from '../component/background';
@@ -33,6 +33,11 @@ const styles = StyleSheet.create({
3333
class PinView extends React.Component {
3434
componentDidMount() {
3535
this.props.auth.tryFingerprint();
36+
this.backHandler = BackHandler.addEventListener('hardwareBackPress', () => true);
37+
}
38+
39+
componentWillUnmount() {
40+
this.backHandler.remove();
3641
}
3742

3843
render() {

0 commit comments

Comments
 (0)