forked from Ivasoft/mattermost-mobile
MM-37666 Properly dismiss edit profile screen (#5599)
* MM-37666 Properly dismiss edit profile screen * pass componentId to modal being dismissed
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user