forked from Expensify/App
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/#Expensify#23229-linking' of https://github.com/ma…
…rgelo/expensify-app-fork into feat/23229-linking-e2e
- Loading branch information
Showing
5 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/pages/home/report/getInitialPaginationSize/index.native.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import CONST from '@src/CONST'; | ||
|
||
function getInitialPaginationSize(): number { | ||
return CONST.MOBILE_PAGINATION_SIZE; | ||
} | ||
export default getInitialPaginationSize; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import * as Browser from '@libs/Browser'; | ||
import CONST from '@src/CONST'; | ||
|
||
const isMobileSafari = Browser.isMobileSafari(); | ||
|
||
function getInitialPaginationSize(numToRender: number): number { | ||
if (isMobileSafari) { | ||
return Math.round(Math.min(numToRender / 3, CONST.MOBILE_PAGINATION_SIZE)); | ||
} | ||
// WEB: Calculate and position it correctly for each frame, enabling the rendering of up to 50 items. | ||
return CONST.WEB_PAGINATION_SIZE; | ||
} | ||
export default getInitialPaginationSize; |