summaryrefslogtreecommitdiff
path: root/src/client/scripts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-07-29 23:59:45 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-07-29 23:59:45 +0900
commitb1e6a33d6b7d24ee8bb21bf2b01e5ffc3f6dc931 (patch)
treed090bd907e13f7cb76d2d3b7f3bbeab58ae51958 /src/client/scripts
parentImprove usability (diff)
downloadsharkey-b1e6a33d6b7d24ee8bb21bf2b01e5ffc3f6dc931.tar.gz
sharkey-b1e6a33d6b7d24ee8bb21bf2b01e5ffc3f6dc931.tar.bz2
sharkey-b1e6a33d6b7d24ee8bb21bf2b01e5ffc3f6dc931.zip
tweak style
Diffstat (limited to 'src/client/scripts')
-rw-r--r--src/client/scripts/paging.ts12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/client/scripts/paging.ts b/src/client/scripts/paging.ts
index bcb0d7f2b0..194c2e8003 100644
--- a/src/client/scripts/paging.ts
+++ b/src/client/scripts/paging.ts
@@ -94,7 +94,11 @@ export default (opts) => ({
for (let i = 0; i < items.length; i++) {
const item = items[i];
markRaw(item);
- if (i === 3) item._shouldInsertAd_ = true;
+ if (this.pagination.reversed) {
+ if (i === items.length - 2) item._shouldInsertAd_ = true;
+ } else {
+ if (i === 3) item._shouldInsertAd_ = true;
+ }
}
if (!this.pagination.noPaging && (items.length > (this.pagination.limit || 10))) {
items.pop();
@@ -133,7 +137,11 @@ export default (opts) => ({
for (let i = 0; i < items.length; i++) {
const item = items[i];
markRaw(item);
- if (i === 10) item._shouldInsertAd_ = true;
+ if (this.pagination.reversed) {
+ if (i === items.length - 9) item._shouldInsertAd_ = true;
+ } else {
+ if (i === 10) item._shouldInsertAd_ = true;
+ }
}
if (items.length > SECOND_FETCH_LIMIT) {
items.pop();