Fix in-app notification crashing when receiving multiple (#3967)

* Fix in-app notification crashing when receiving multiple

* Dismiss the overlay when tap without waiting for interaction manager
This commit is contained in:
Elias Nahum 2020-02-26 12:57:17 -03:00 committed by GitHub
parent 3e54e4b859
commit 28384bc9d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 3 deletions

View file

@ -347,7 +347,6 @@ export function showOverlay(name, passProps, options = {}) {
Navigation.showOverlay({
component: {
id: name,
name,
passProps,
options: merge(defaultOptions, options),

View file

@ -440,7 +440,6 @@ describe('app/actions/navigation', () => {
const expectedLayout = {
component: {
id: name,
name,
passProps,
options: merge(defaultOptions, options),

View file

@ -145,8 +145,8 @@ export default class Notification extends PureComponent {
EventEmitter.emit(NavigationTypes.CLOSE_MAIN_SIDEABR);
EventEmitter.emit(NavigationTypes.CLOSE_SETTINGS_SIDEBAR);
this.dismissOverlay();
InteractionManager.runAfterInteractions(() => {
this.dismissOverlay();
if (!notification.localNotification) {
actions.loadFromPushNotification(notification);
}