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:
Elias Nahum
2021-08-06 08:57:43 -04:00
committed by GitHub
parent a7b604e8c9
commit 3ac73e808b
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});
}
};