diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2021-08-11 22:36:59 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2021-08-11 22:36:59 +0900 |
| commit | 42c4ea38ccf09ba37ff552e37778ba1b702b781c (patch) | |
| tree | 39bffcf6c87fe7f0b31778b71993be2a72c0881d /src/client/scripts | |
| parent | Merge branch 'develop' (diff) | |
| parent | 12.86.0 (diff) | |
| download | misskey-42c4ea38ccf09ba37ff552e37778ba1b702b781c.tar.gz misskey-42c4ea38ccf09ba37ff552e37778ba1b702b781c.tar.bz2 misskey-42c4ea38ccf09ba37ff552e37778ba1b702b781c.zip | |
Merge branch 'develop'
Diffstat (limited to 'src/client/scripts')
| -rw-r--r-- | src/client/scripts/paging.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/client/scripts/paging.ts b/src/client/scripts/paging.ts index 194c2e8003..1da518efa1 100644 --- a/src/client/scripts/paging.ts +++ b/src/client/scripts/paging.ts @@ -201,7 +201,11 @@ export default (opts) => ({ if (isBottom) { // オーバーフローしたら古いアイテムは捨てる if (this.items.length >= opts.displayLimit) { - this.items = this.items.slice(-opts.displayLimit); + // このやり方だとVue 3.2以降アニメーションが動かなくなる + //this.items = this.items.slice(-opts.displayLimit); + while (this.items.length >= opts.displayLimit) { + this.items.shift(); + } this.more = true; } } @@ -216,7 +220,11 @@ export default (opts) => ({ // オーバーフローしたら古いアイテムは捨てる if (this.items.length >= opts.displayLimit) { - this.items = this.items.slice(0, opts.displayLimit); + // このやり方だとVue 3.2以降アニメーションが動かなくなる + //this.items = this.items.slice(0, opts.displayLimit); + while (this.items.length >= opts.displayLimit) { + this.items.pop(); + } this.more = true; } } else { |