feat: mark all as read action in chat

This commit is contained in:
Kainoa Kanter 2023-04-07 23:49:36 -07:00
parent 594ee74324
commit 0717454d49
1 changed files with 7 additions and 4 deletions

View File

@ -121,12 +121,15 @@ window.addEventListener("resize", () => {
deviceKind === "smartphone" || window.innerWidth <= MOBILE_THRESHOLD; deviceKind === "smartphone" || window.innerWidth <= MOBILE_THRESHOLD;
}); });
async function readAllMessagingMessages() {
await os.api("i/read-all-messaging-messages");
}
const headerActions = $computed(() => [ const headerActions = $computed(() => [
{ {
asFullButton: true, icon: "ph-check ph-bold ph-lg",
icon: "ph-plus ph-bold ph-lg", text: i18n.ts.markAllAsRead,
text: i18n.ts.addUser, handler: readAllMessagingMessages,
handler: startMenu,
}, },
]); ]);