refactor: uses of chats.set(...) support pagi sidebar

This commit is contained in:
Aryan Kothari
2024-08-01 15:20:36 -04:00
parent 62dc486c85
commit 2c4bc7a2b2
5 changed files with 70 additions and 19 deletions

View File

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