Feat: 絵文字申請中のやつのテーブルを分けた
Signed-off-by: mattyatea <mattyacocacora0@gmail.com>
This commit is contained in:
parent
97590f2567
commit
fe938bf8e6
29 changed files with 666 additions and 189 deletions
|
|
@ -201,11 +201,13 @@ async function init(): Promise<void> {
|
|||
...params,
|
||||
limit: props.pagination.limit ?? 10,
|
||||
}).then(res => {
|
||||
if (props.pagination.endpoint === 'emoji-drafts') {
|
||||
res = res.emojis;
|
||||
}
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
const item = res[i];
|
||||
if (i === 3) item._shouldInsertAd_ = true;
|
||||
}
|
||||
|
||||
if (res.length === 0 || props.pagination.noPaging) {
|
||||
concatItems(res);
|
||||
more.value = false;
|
||||
|
|
@ -214,7 +216,6 @@ async function init(): Promise<void> {
|
|||
concatItems(res);
|
||||
more.value = true;
|
||||
}
|
||||
|
||||
offset.value = res.length;
|
||||
error.value = false;
|
||||
fetching.value = false;
|
||||
|
|
@ -241,6 +242,9 @@ const fetchMore = async (): Promise<void> => {
|
|||
untilId: Array.from(items.value.keys()).at(-1),
|
||||
}),
|
||||
}).then(res => {
|
||||
if (props.pagination.endpoint === 'emoji-drafts') {
|
||||
res = res.emojis;
|
||||
}
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
const item = res[i];
|
||||
if (i === 10) item._shouldInsertAd_ = true;
|
||||
|
|
@ -305,6 +309,9 @@ const fetchMoreAhead = async (): Promise<void> => {
|
|||
sinceId: Array.from(items.value.keys()).at(-1),
|
||||
}),
|
||||
}).then(res => {
|
||||
if (props.pagination.endpoint === 'emoji-drafts') {
|
||||
res = res.emojis;
|
||||
}
|
||||
if (res.length === 0) {
|
||||
items.value = concatMapWithArray(items.value, res);
|
||||
more.value = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue