Co-authored-by: Jean-Paul Manuel <jean-paulm@yoyowallet.com>
(cherry picked from commit 8cbf57781b)
Co-authored-by: Jean-Paul Manuel <jpmastermind@gmail.com>
This commit is contained in:
parent
19be35c343
commit
8e26b4b2b5
2 changed files with 11 additions and 13 deletions
|
|
@ -140,18 +140,16 @@ export function componentDidDisappearListener({componentId}) {
|
|||
|
||||
if (componentId === 'MainSidebar') {
|
||||
EventEmitter.emit(NavigationTypes.MAIN_SIDEBAR_DID_CLOSE);
|
||||
}
|
||||
|
||||
if (componentId === THREAD) {
|
||||
if (EphemeralStore.hasModalsOpened()) {
|
||||
for (const modal of EphemeralStore.navigationModalStack) {
|
||||
const enableSwipe = {
|
||||
modal: {
|
||||
swipeToDismiss: true,
|
||||
},
|
||||
};
|
||||
Navigation.mergeOptions(modal, enableSwipe);
|
||||
}
|
||||
} else if (componentId === 'SettingsSidebar') {
|
||||
EventEmitter.emit(NavigationTypes.CLOSE_SETTINGS_SIDEBAR);
|
||||
} else if (componentId === THREAD && EphemeralStore.hasModalsOpened()) {
|
||||
for (const modal of EphemeralStore.navigationModalStack) {
|
||||
const enableSwipe = {
|
||||
modal: {
|
||||
swipeToDismiss: true,
|
||||
},
|
||||
};
|
||||
Navigation.mergeOptions(modal, enableSwipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class EphemeralStore {
|
|||
|
||||
addToNavigationComponentIdStack = (componentId) => {
|
||||
const index = this.navigationComponentIdStack.indexOf(componentId);
|
||||
if (index > 0) {
|
||||
if (index >= 0) {
|
||||
this.navigationComponentIdStack.slice(index, 1);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue