Merge some parts of initByJson and initUpdateByMessageJson

Cleanup messageListChecked handling
This commit is contained in:
djmaze 2020-09-20 11:29:31 +02:00
parent 46198861bc
commit b66e68a3b1
8 changed files with 46 additions and 61 deletions

View file

@ -146,7 +146,7 @@ class Selector {
if (0 < len && aCheckedCache.includes(uid)) {
isChecked = true;
item.checked(true);
len -= 1;
--len;
}
if (!isChecked && null !== mSelected && mSelected === uid) {

View file

@ -418,7 +418,7 @@ export function htmlToPlain(html) {
limit = 800;
while (0 < limit) {
limit -= 1;
--limit;
iP1 = text.indexOf('__bq__start__', pos);
if (-1 < iP1) {
iP2 = text.indexOf('__bq__start__', iP1 + 5);
@ -778,17 +778,17 @@ export function computedPagenatorHelper(koCurrentPage, koPageCount) {
}
while (0 < limit) {
prev -= 1;
next += 1;
--prev;
++next;
if (0 < prev) {
fAdd(prev, false);
limit -= 1;
--limit;
}
if (pageCount >= next) {
fAdd(next, true);
limit -= 1;
--limit;
} else if (0 >= prev) {
break;
}