From 0123c631be0bb9a9bfea1a28777d73aa7939127a Mon Sep 17 00:00:00 2001 From: Mattermost Build Date: Fri, 6 Aug 2021 15:17:08 +0200 Subject: [PATCH] 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 3ac73e808bb1899b1870e3b662516ba5c651a4ab) Co-authored-by: Elias Nahum --- app/actions/navigation/index.js | 2 +- app/screens/edit_profile/edit_profile.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/actions/navigation/index.js b/app/actions/navigation/index.js index bb39129cc..df0944533 100644 --- a/app/actions/navigation/index.js +++ b/app/actions/navigation/index.js @@ -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); diff --git a/app/screens/edit_profile/edit_profile.js b/app/screens/edit_profile/edit_profile.js index 6d3eac38e..cd06bdb76 100644 --- a/app/screens/edit_profile/edit_profile.js +++ b/app/screens/edit_profile/edit_profile.js @@ -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}); } };