From 63c35871b266352aba471ceaf26ad931a02a0f2e Mon Sep 17 00:00:00 2001 From: Kainoa Kanter Date: Sat, 8 Apr 2023 00:18:37 -0700 Subject: [PATCH] fix chat metadata --- .../src/pages/messaging/messaging-room.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/packages/client/src/pages/messaging/messaging-room.vue b/packages/client/src/pages/messaging/messaging-room.vue index 442a905519..4e96235db3 100644 --- a/packages/client/src/pages/messaging/messaging-room.vue +++ b/packages/client/src/pages/messaging/messaging-room.vue @@ -333,13 +333,6 @@ const headerTabs = $computed(() => []); onMounted(() => { fetch(); - definePageMetadata( - computed(() => ({ - title: group != null ? group.name : user?.name, - icon: "ph-chats-teardrop ph-bold ph-lg", - avatar: group != null ? null : user, - })) - ); }); onBeforeUnmount(() => { @@ -347,6 +340,15 @@ onBeforeUnmount(() => { document.removeEventListener("visibilitychange", onVisibilitychange); if (scrollRemove) scrollRemove(); }); + +await fetch(); +definePageMetadata( + computed(() => ({ + title: group != null ? group.name : user?.name, + icon: "ph-chats-teardrop ph-bold ph-lg", + avatar: group != null ? null : user, + })) + );