Fix pop thread screen when deleting the root post (#3093)
This commit is contained in:
parent
aceef20257
commit
41ddb5cc1a
2 changed files with 9 additions and 5 deletions
|
|
@ -166,11 +166,14 @@ export function goToScreen(name, title, passProps = {}, options = {}) {
|
|||
};
|
||||
}
|
||||
|
||||
export function popTopScreen() {
|
||||
export function popTopScreen(screenId) {
|
||||
return () => {
|
||||
const componentId = EphemeralStore.getNavigationTopComponentId();
|
||||
|
||||
Navigation.pop(componentId);
|
||||
if (screenId) {
|
||||
Navigation.pop(screenId);
|
||||
} else {
|
||||
const componentId = EphemeralStore.getNavigationTopComponentId();
|
||||
Navigation.pop(componentId);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,8 @@ export default class ThreadBase extends PureComponent {
|
|||
}
|
||||
|
||||
close = () => {
|
||||
this.props.actions.popTopScreen();
|
||||
const {actions, componentId} = this.props;
|
||||
actions.popTopScreen(componentId);
|
||||
};
|
||||
|
||||
handleAutoComplete = (value) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue