fix pagination.vue lints

This commit is contained in:
Francis Dinh 2022-08-22 23:16:56 -04:00 committed by ThatOneCalculator
parent 437ab8e8fe
commit 5d7fea344b
1 changed files with 5 additions and 5 deletions

View File

@ -39,8 +39,6 @@ import { onScrollTop, isTopVisible, getScrollPosition, getScrollContainer } from
import MkButton from '@/components/ui/button.vue';
import { i18n } from '@/i18n';
const SECOND_FETCH_LIMIT = 30;
export type Paging<E extends keyof misskey.Endpoints = keyof misskey.Endpoints> = {
endpoint: E;
limit: number;
@ -60,6 +58,8 @@ export type Paging<E extends keyof misskey.Endpoints = keyof misskey.Endpoints>
offsetMode?: boolean;
};
const SECOND_FETCH_LIMIT = 30;
const props = withDefaults(defineProps<{
pagination: Paging;
disableAutoLoad?: boolean;
@ -244,8 +244,8 @@ const prepend = (item: Item): void => {
} else {
queue.value.push(item);
onScrollTop(rootEl.value, () => {
for (const item of queue.value) {
prepend(item);
for (const queueItem of queue.value) {
prepend(queueItem);
}
queue.value = [];
});
@ -257,7 +257,7 @@ const append = (item: Item): void => {
items.value.push(item);
};
const removeItem = (finder: (item: Item) => boolean) => {
const removeItem = (finder: (item: Item) => boolean): void => {
const i = items.value.findIndex(finder);
items.value.splice(i, 1);
};