From 0717454d49866f1a94f92690667739d47e768b52 Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Fri, 7 Apr 2023 23:49:36 -0700 Subject: [PATCH] feat: mark all as read action in chat --- packages/client/src/pages/messaging/index.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/client/src/pages/messaging/index.vue b/packages/client/src/pages/messaging/index.vue index 768c58cc62..4afe832db7 100644 --- a/packages/client/src/pages/messaging/index.vue +++ b/packages/client/src/pages/messaging/index.vue @@ -121,12 +121,15 @@ window.addEventListener("resize", () => { deviceKind === "smartphone" || window.innerWidth <= MOBILE_THRESHOLD; }); +async function readAllMessagingMessages() { + await os.api("i/read-all-messaging-messages"); +} + const headerActions = $computed(() => [ { - asFullButton: true, - icon: "ph-plus ph-bold ph-lg", - text: i18n.ts.addUser, - handler: startMenu, + icon: "ph-check ph-bold ph-lg", + text: i18n.ts.markAllAsRead, + handler: readAllMessagingMessages, }, ]);