Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix loading indicator when the app is loading #56314

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/pages/home/sidebar/SidebarLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import useLocalize from '@hooks/useLocalize';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useStyleUtils from '@hooks/useStyleUtils';
import useThemeStyles from '@hooks/useThemeStyles';
import {confirmReadyToOpenApp, setSidebarLoaded} from '@libs/actions/App';
import Navigation from '@libs/Navigation/Navigation';
import * as ReportActionContextMenu from '@pages/home/report/ContextMenu/ReportActionContextMenu';
import * as App from '@userActions/App';
import CONST from '@src/CONST';
import ROUTES from '@src/ROUTES';
import type {Report} from '@src/types/onyx';
Expand Down Expand Up @@ -44,7 +44,7 @@ function SidebarLinks({insets, optionListItems, isLoading, priorityMode = CONST.
const {shouldUseNarrowLayout} = useResponsiveLayout();

useEffect(() => {
App.confirmReadyToOpenApp();
confirmReadyToOpenApp();
}, []);

useEffect(() => {
Expand Down Expand Up @@ -91,10 +91,10 @@ function SidebarLinks({insets, optionListItems, isLoading, priorityMode = CONST.
onSelectRow={showReportPage}
shouldDisableFocusOptions={shouldUseNarrowLayout}
optionMode={viewMode}
onFirstItemRendered={App.setSidebarLoaded}
onFirstItemRendered={setSidebarLoaded}
/>
{!!isLoading && optionListItems?.length === 0 && (
<View style={[StyleSheet.absoluteFillObject, styles.appBG]}>
<View style={[StyleSheet.absoluteFillObject, styles.appBG, styles.mt3]}>
nkdengineer marked this conversation as resolved.
Show resolved Hide resolved
<OptionsListSkeletonView shouldAnimate />
</View>
)}
Expand Down
Loading