Trigger loadMoreHistory with semantic history

pull/1/head
yflory 4 years ago
parent d702cbf548
commit 9a3238fb3b

@ -328,9 +328,6 @@ define([
if (isNaN(i)) { return; } if (isNaN(i)) { return; }
if (i > 0) { i = 0; } if (i > 0) { i = 0; }
if (i < -(states.length - 2)) { i = -(states.length - 2); } if (i < -(states.length - 2)) { i = -(states.length - 2); }
if (i <= -(states.length - 11)) {
loadMore();
}
var idx = getIndex(i); var idx = getIndex(i);
if (semantic && i !== c) { if (semantic && i !== c) {
@ -346,6 +343,10 @@ define([
} }
} }
if (i <= -(states.length - 11)) {
loadMore();
}
if (blockOnly) { return states[idx]; } if (blockOnly) { return states[idx]; }
var val = states[idx].getContent().doc; var val = states[idx].getContent().doc;

Loading…
Cancel
Save