Skip to content

Commit 3c744ac

Browse files
committed
SharingScreen: Use resetToAccountPicker, not navigateToAccountPicker
There's no reason to keep a SharingScreen in the nav stack in this case. There won't be anything useful on it -- it depends on a logged-in account with server data -- and the only way to change that is by following the auth flow, which will result in a `resetToMainTabs` that clears the SharingScreen off the stack anyway.
1 parent db8b0de commit 3c744ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sharing/SharingScreen.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import { useGlobalSelector } from '../react-redux';
1818
import ZulipTextIntl from '../common/ZulipTextIntl';
1919
import Screen from '../common/Screen';
2020
import { getHasAuth } from '../selectors';
21-
import { navigateToAccountPicker } from '../nav/navActions';
21+
import { resetToAccountPicker } from '../nav/navActions';
2222
import ShareToStream from './ShareToStream';
2323
import ShareToPm from './ShareToPm';
2424
import { useHaveServerDataGate } from '../withHaveServerDataGate';
@@ -58,7 +58,7 @@ export default function SharingScreen(props: Props): Node {
5858
if (!hasAuth) {
5959
// If there is no active logged-in account, abandon the sharing attempt,
6060
// and present the account picker screen to the user.
61-
NavigationService.dispatch(navigateToAccountPicker());
61+
NavigationService.dispatch(resetToAccountPicker());
6262
}
6363
}, [hasAuth]);
6464

0 commit comments

Comments
 (0)