Skip to content

Commit

Permalink
Merge pull request #19244 from 0xmiroslav/fix/17477-follow-up
Browse files Browse the repository at this point in the history
fix wrong condition of splash hidden
  • Loading branch information
mountiny authored May 19, 2023
2 parents c98a5c8 + 4aded75 commit f27e8b4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Expensify.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ function Expensify(props) {
const [isSplashHidden, setIsSplashHidden] = useState(false);

const isAuthenticated = useMemo(() => Boolean(lodashGet(props.session, 'authToken', null)), [props.session]);
const shouldHideSplash = isNavigationReady && !isSplashHidden && (!isAuthenticated || props.isSidebarLoaded);
const shouldInit = isNavigationReady && (!isAuthenticated || props.isSidebarLoaded);
const shouldHideSplash = shouldInit && !isSplashHidden;

const initializeClient = () => {
if (!Visibility.isVisible()) {
Expand Down Expand Up @@ -171,7 +172,7 @@ function Expensify(props) {

return (
<DeeplinkWrapper>
{shouldHideSplash && (
{shouldInit && (
<>
<KeyboardShortcutsModal />
<GrowlNotification ref={Growl.growlRef} />
Expand Down

0 comments on commit f27e8b4

Please sign in to comment.