feat: add unread filters to inbox and reports

This commit is contained in:
Xyphyn committed 2023-07-29 13:09:40 -07:00
1 parent d65c62d2d9
commit 1c9661546c
4 files changed
+81 -20

No files matched your search

+4 -1
View File
@@ -12,11 +12,14 @@ export async function load({ url }) {
(url.searchParams.get('type') as InboxFeedType) || 'all'
const client = getClient()
const page = Number(url.searchParams.get('page')) || 1
const unreadOnly: boolean =
(url.searchParams.get('unreadOnly') || 'true') == 'true'
const params = {
limit: 50,
page: page,
auth: auth.token,
unread_only: unreadOnly,
}
const [replies, mentions, privateMessages] = await Promise.all([
@@ -51,5 +54,5 @@ export async function load({ url }) {
Date.parse(getInboxItemPublished(a))
)
return { type: type, page: page, data: data }
return { unreadOnly: unreadOnly, type: type, page: page, data: data }
}