Skip to content

Commit 9509960

Browse files
author
thyttan
committed
dtlaunch: land on using Math.ceil/min
1 parent ec84a7a commit 9509960

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/dtlaunch/app-b2.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
page = (global.dtlaunch&&dtlaunch.handlePagePersist()) ??
4242
(parseInt(s.read("dtlaunch.page")) ?? 0);
4343
initPageAppZeroth = page*4;
44-
initPageAppLast = (page*4+3<apps.length-1)?page*4+3:apps.length-1;//Math.min(page*4+3, apps.length-1); // FIXME:What is fastest?
44+
initPageAppLast = Math.min(page*4+3, apps.length-1);
4545
}
4646

4747
for (let i = initPageAppZeroth; i <= initPageAppLast; i++) { // Initially only load icons for the current page.
@@ -50,7 +50,7 @@
5050
}
5151

5252
let Napps = apps.length;
53-
let Npages = parseInt(Napps/4+1); //Math.ceil(Napps/4); // FIXME: What is fastest?
53+
let Npages = Math.ceil(Napps/4);
5454
let maxPage = Npages-1;
5555
let selected = -1;
5656
//let oldselected = -1;

0 commit comments

Comments
 (0)