diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-05-04 22:53:25 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-05-04 22:53:25 +0900 |
| commit | cdef5cd1ad7c1195d0273f6d78fc6aafe990007b (patch) | |
| tree | 621bb32c52de5ca1b153c3d3fbe3573919fe0205 /src/client/scripts | |
| parent | Merge branch 'develop' (diff) | |
| parent | 12.80.0 (diff) | |
| download | misskey-cdef5cd1ad7c1195d0273f6d78fc6aafe990007b.tar.gz misskey-cdef5cd1ad7c1195d0273f6d78fc6aafe990007b.tar.bz2 misskey-cdef5cd1ad7c1195d0273f6d78fc6aafe990007b.zip | |
Merge branch 'develop'
Diffstat (limited to 'src/client/scripts')
| -rw-r--r-- | src/client/scripts/paging.ts | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/client/scripts/paging.ts b/src/client/scripts/paging.ts index 2e49f1a64c..bcb0d7f2b0 100644 --- a/src/client/scripts/paging.ts +++ b/src/client/scripts/paging.ts @@ -91,8 +91,10 @@ export default (opts) => ({ ...params, limit: this.pagination.noPaging ? (this.pagination.limit || 10) : (this.pagination.limit || 10) + 1, }).then(items => { - for (const item of items) { + for (let i = 0; i < items.length; i++) { + const item = items[i]; markRaw(item); + if (i === 3) item._shouldInsertAd_ = true; } if (!this.pagination.noPaging && (items.length > (this.pagination.limit || 10))) { items.pop(); @@ -128,8 +130,10 @@ export default (opts) => ({ untilId: this.pagination.reversed ? this.items[0].id : this.items[this.items.length - 1].id, }), }).then(items => { - for (const item of items) { + for (let i = 0; i < items.length; i++) { + const item = items[i]; markRaw(item); + if (i === 10) item._shouldInsertAd_ = true; } if (items.length > SECOND_FETCH_LIMIT) { items.pop(); |