feat: improve messages experience (#572)

* impr: add message paginatin

* impr: add message timestamps, close #569

* feat: add start chat button, close #566

* fix: frozen lockfile
This commit is contained in:
Xylight authored and GitHub committed 2025-06-15 10:37:27 -07:00
1 parent ed960b969f
commit 7125a22252
7 files changed
+104 -30

No files matched your search

+5 -1
View File
@@ -1,13 +1,17 @@
import { client } from '$lib/lemmy.svelte.js'
import { awaitIfServer } from '$lib/promise.svelte.js'
export async function load({ fetch }) {
export async function load({ fetch, url }) {
const page = Number(url.searchParams.get('page') || '1')
// TODO probably add proper paging
const messagePromise = client({ func: fetch }).getPrivateMessages({
limit: 50,
page: page,
})
return {
messages: (await awaitIfServer(messagePromise)).data,
page: page,
}
}