Skip to content

Commit

Permalink
[FIX] Empty space on Messagebox (#2704)
Browse files Browse the repository at this point in the history
Co-authored-by: Diego Mello <[email protected]>
  • Loading branch information
djorkaeffalexandre and diegolmello authored Dec 14, 2020
1 parent f5b9dc6 commit 5d4e820
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions app/containers/MessageBox/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import {
View, Alert, Keyboard, NativeModules, Text
View, Alert, Keyboard, NativeModules, Text, InteractionManager
} from 'react-native';
import { connect } from 'react-redux';
import { KeyboardAccessoryView } from 'react-native-ui-lib/keyboard';
Expand Down Expand Up @@ -222,9 +222,14 @@ class MessageBox extends Component {
}

this.unsubscribeFocus = navigation.addListener('focus', () => {
if (this.tracking && this.tracking.resetTracking) {
this.tracking.resetTracking();
}
// didFocus
// We should wait pushed views be dismissed
InteractionManager.runAfterInteractions(() => {
if (this.tracking && this.tracking.resetTracking) {
// Reset messageBox keyboard tracking
this.tracking.resetTracking();
}
});
});
this.unsubscribeBlur = navigation.addListener('blur', () => {
this.component?.blur();
Expand Down

0 comments on commit 5d4e820

Please sign in to comment.