Skip to content

Commit

Permalink
Fix ios scroll indicator
Browse files Browse the repository at this point in the history
  • Loading branch information
VickyStash committed Aug 29, 2024
1 parent 4df965d commit c6ce0f8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/pages/workspace/WorkspacePageWithSections.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ type WorkspacePageWithSectionsProps = WithPolicyAndFullscreenLoadingProps &
/** Whether to include safe area padding bottom or not */
includeSafeAreaPaddingBottom?: boolean;

/** Makes firstRender ref display loading page before isLoading is change to true */
showLoadingAsFirstRender?: boolean;

/** Policy values needed in the component */
policy: OnyxEntry<Policy>;

Expand Down Expand Up @@ -118,6 +121,7 @@ function WorkspacePageWithSections({
reimbursementAccount = CONST.REIMBURSEMENT_ACCOUNT.DEFAULT_DATA,
route,
shouldUseScrollView = false,
showLoadingAsFirstRender = true,
shouldSkipVBBACall = true,
shouldShowBackButton = false,
user,
Expand All @@ -142,7 +146,7 @@ function WorkspacePageWithSections({
const hasVBA = achState === BankAccount.STATE.OPEN;
const content = typeof children === 'function' ? children(hasVBA, policyID, isUsingECard) : children;
const {shouldUseNarrowLayout} = useResponsiveLayout();
const firstRender = useRef(true);
const firstRender = useRef(showLoadingAsFirstRender);
const isFocused = useIsFocused();
const prevPolicy = usePrevious(policy);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ function WorkspaceCompanyCardsList({policyID, cardsList, selectedFeed}: Workspac
renderItem={renderItem}
ListHeaderComponent={renderListHeader}
stickyHeaderIndices={[0]}
scrollIndicatorInsets={{right: Number.MIN_VALUE}}
/>
</View>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ function WorkspaceCompanyCardPage({route}: WorkspaceCompanyCardPageProps) {
guidesCallTaskID={CONST.GUIDES_CALL_TASK_IDS.WORKSPACE_COMPANY_CARDS}
shouldShowOfflineIndicatorInWideScreen
includeSafeAreaPaddingBottom
showLoadingAsFirstRender={false}
>
<WorkspaceCompanyCardsList
cardsList={cardsList}
Expand Down

0 comments on commit c6ce0f8

Please sign in to comment.