Skip to content

Commit

Permalink
feat: strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuever committed Oct 7, 2023
1 parent afc1734 commit 80eb2b6
Showing 1 changed file with 3 additions and 14 deletions.
17 changes: 3 additions & 14 deletions packages/data-model/src/ListBaseDimensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -649,40 +649,29 @@ class ListBaseDimensions<ItemT extends {} = {}> extends BaseLayout {
safeRange,
startIndex,
maxCount: 10,
// maxCount:
// visibleEndIndex - visibleStartIndex + 1 + recycleBufferedCount,
step: 1,
onProcess: this._onRecyclerProcess,
/** TODO !!!!!! */
// maxIndex: this.getData().length,
});
} else if (velocity > 0) {
// iOS scroll up velocity > 0
this._recycler.updateIndices({
safeRange,
startIndex: visibleStartIndex,
maxCount: 10,

// maxCount:
// visibleEndIndex - visibleStartIndex + 1 + recycleBufferedCount,
step: 1,
onProcess: this._onRecyclerProcess,

/** TODO */
// maxIndex: this.getData().length,
});
} else {
const startIndex = Math.max(
visibleStartIndex - recycleBufferedCount,
this._recycler.thresholdIndexValue
);
this._recycler.updateIndices({
safeRange,
startIndex,
startIndex: visibleEndIndex,
maxCount: 10,

// maxCount:
// visibleEndIndex - visibleStartIndex + 1 + recycleBufferedCount,
step: 1,
step: -1,
onProcess: this._onRecyclerProcess,
/** TODO */
// maxIndex: this.getData().length,
Expand Down

0 comments on commit 80eb2b6

Please sign in to comment.