format: whole project

This commit is contained in:
James Xylight committed 2025-02-04 16:23:31 -08:00
1 parent b883b5f6e0
commit 80269cf275
79 files changed
+590 -612

No files matched your search

+8 -5
View File
@@ -67,7 +67,7 @@ export const isCommentReport = (item: Result): item is CommentReportView =>
'comment_report' in item
export const isPrivateMessageReport = (
item: Result
item: Result,
): item is PrivateMessageReportView => 'private_message_report' in item
export interface ResumableItem {
@@ -86,15 +86,18 @@ function resumableStore(limit: number = 10) {
const { subscribe, set, update } = writable<ResumableItem[]>([])
return {
subscribe, set, update,
subscribe,
set,
update,
add: (item: ResumableItem) => {
update(resumables => {
if (resumables.find(i => JSON.stringify(i) == JSON.stringify(item))) return resumables
update((resumables) => {
if (resumables.find((i) => JSON.stringify(i) == JSON.stringify(item)))
return resumables
resumables.unshift(item)
if (resumables.length > limit) resumables.pop()
return resumables
})
}
},
}
}