refac: chatlist skip, limit -> page

This commit is contained in:
Timothy J. Baek
2024-08-04 16:58:08 +02:00
parent a2f9f7c975
commit a084938d9c
10 changed files with 72 additions and 74 deletions

View File

@@ -1,6 +1,6 @@
<script lang="ts">
import { v4 as uuidv4 } from 'uuid';
import { chats, config, settings, user as _user, mobile, pageSkip, pageLimit } from '$lib/stores';
import { chats, config, settings, user as _user, mobile, currentChatPage } from '$lib/stores';
import { tick, getContext, onMount } from 'svelte';
import { toast } from 'svelte-sonner';
@@ -90,7 +90,8 @@
history: history
});
await chats.set(await getChatList(localStorage.token, 0, $pageSkip * $pageLimit || $pageLimit));
currentChatPage.set(0);
await chats.set(await getChatList(localStorage.token, $currentChatPage));
};
const confirmEditResponseMessage = async (messageId, content) => {