Automated cherry pick of #3967 (#3969)

* Fix in-app notification crashing when receiving multiple

* Dismiss the overlay when tap without waiting for interaction manager

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
Mattermost Build
2020-02-26 17:00:37 +01:00
committed by GitHub
parent a3df718db7
commit 73008d1a5b
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);
}