MM-26638 MM-26656 await when dismissing post options modal (#4522)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
Mattermost Build 2020-07-02 19:36:25 +02:00 committed by GitHub
parent 593a39220e
commit 0ef94c23af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -56,7 +56,7 @@ export default class PostOptions extends PureComponent {
};
close = async (cb) => {
dismissModal();
await dismissModal();
if (typeof cb === 'function') {
requestAnimationFrame(cb);
@ -260,7 +260,7 @@ export default class PostOptions extends PureComponent {
onEmojiPress: this.handleAddReactionToPost,
};
this.close(() => showModal(screen, title, passProps));
this.closeWithAnimation(() => showModal(screen, title, passProps));
});
};
@ -362,7 +362,7 @@ export default class PostOptions extends PureComponent {
closeButton: source,
};
this.close(() => showModal(screen, title, passProps));
this.closeWithAnimation(() => showModal(screen, title, passProps));
});
};