Skip to content

Commit

Permalink
adjust getInitialPaginationSize
Browse files Browse the repository at this point in the history
  • Loading branch information
perunt committed Jan 29, 2024
1 parent 4f4a2c2 commit 48824e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3166,7 +3166,7 @@ const CONST = {
REPORT_FIELD_TITLE_FIELD_ID: 'text_title',

MOBILE_PAGINATION_SIZE: 15,
WEB_PAGINATION_SIZE: 50
WEB_PAGINATION_SIZE: 50,
} as const;

type Country = keyof typeof CONST.ALL_COUNTRIES;
Expand Down
3 changes: 1 addition & 2 deletions src/pages/home/report/getInitialPaginationSize/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import * as Browser from '@libs/Browser';
import CONST from '@src/CONST';

const isMobileChrome = Browser.isMobileChrome();
const isMobileSafari = Browser.isMobileSafari();

function getInitialPaginationSize(numToRender: number): number {
if (isMobileChrome || isMobileSafari) {
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.
Expand Down

0 comments on commit 48824e5

Please sign in to comment.