Skip to content

Commit

Permalink
fix: isAndroid conditional on unmount
Browse files Browse the repository at this point in the history
  • Loading branch information
OtavioStasiak authored and diegolmello committed Nov 19, 2024
1 parent 68d6f40 commit a03d383
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/views/NewServerView/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,11 @@ class NewServerView extends React.Component<INewServerViewProps, INewServerViewS
componentWillUnmount() {
EventEmitter.removeListener('NewServer', this.handleNewServerEvent);
BackHandler.removeEventListener('hardwareBackPress', this.handleBackPress);
Keyboard.removeAllListeners('keyboardDidShow');
Keyboard.removeAllListeners('keyboardDidHide');
if (isAndroid) {
Keyboard.removeAllListeners('keyboardDidShow');
Keyboard.removeAllListeners('keyboardDidHide');
}

const { previousServer, dispatch } = this.props;
if (previousServer) {
dispatch(serverFinishAdd());
Expand Down

0 comments on commit a03d383

Please sign in to comment.