MM-37666 Properly dismiss edit profile screen (#5599) (#5605)

* MM-37666 Properly dismiss edit profile screen

* pass componentId to modal being dismissed

(cherry picked from commit 3ac73e808b)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
Mattermost Build 2021-08-06 15:17:08 +02:00 committed by GitHub
parent 71f80a033e
commit 0123c631be
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -377,7 +377,7 @@ export async function dismissModal(options = {}) {
return;
}
const componentId = EphemeralStore.getNavigationTopComponentId();
const componentId = options.componentId || EphemeralStore.getNavigationTopComponentId();
try {
await Navigation.dismissModal(componentId, options);

View file

@ -179,11 +179,11 @@ export default class EditProfile extends PureComponent {
};
close = () => {
const {commandType} = this.props;
const {commandType, componentId} = this.props;
if (commandType === 'Push') {
popTopScreen();
popTopScreen(componentId);
} else {
dismissModal();
dismissModal({componentId});
}
};