Skip to content

Commit

Permalink
rename listener
Browse files Browse the repository at this point in the history
  • Loading branch information
akinwale committed Jul 25, 2023
1 parent 7575f29 commit 6d08325
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/TextInput/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class TextInput extends React.Component {
}

// Forcefully activate the soft keyboard when the user switches between tabs while input was focused.
this.unsubscribeVisibilityListener = Visibility.onVisibilityChange(() => {
this.removeVisibilityListener = Visibility.onVisibilityChange(() => {
if (!Visibility.isVisible() || !this.textInput || DomUtils.getActiveElement() !== this.textInput) {
return;
}
Expand All @@ -28,10 +28,10 @@ class TextInput extends React.Component {
}

componentWillUnmount() {
if (!this.unsubscribeVisibilityListener) {
if (!this.removeVisibilityListener) {
return;
}
this.unsubscribeVisibilityListener();
this.removeVisibilityListener();
}

render() {
Expand Down

0 comments on commit 6d08325

Please sign in to comment.