From 2eab53a12726f201d3ed3e786c3fbfe16a56d407 Mon Sep 17 00:00:00 2001 From: Nizzy Date: Tue, 15 Apr 2025 13:24:36 -0700 Subject: [PATCH 1/2] check for numer of ppl in email and update header to have reply if more than 2 --- apps/mail/components/mail/thread-display.tsx | 32 +++++++++++--------- 1 file changed, 18 insertions(+), 14 deletions(-) diff --git a/apps/mail/components/mail/thread-display.tsx b/apps/mail/components/mail/thread-display.tsx index 808f1a5e91..2abab96485 100644 --- a/apps/mail/components/mail/thread-display.tsx +++ b/apps/mail/components/mail/thread-display.tsx @@ -160,6 +160,8 @@ export function ThreadDisplay({ threadParam, onClose, isMobile, id }: ThreadDisp }); }, [emailData]); + const hasMultipleParticipants = (emailData?.[0]?.to?.length ?? 0) + (emailData?.[0]?.cc?.length ?? 0) + 1 > 2; + /** * Mark email as read if it's unread, if there are no unread emails, mark the current thread as read */ @@ -388,20 +390,22 @@ export function ThreadDisplay({ threadParam, onClose, isMobile, id }: ThreadDisp })); }} /> - { - setMail((prev) => ({ - ...prev, - replyComposerOpen: false, - replyAllComposerOpen: true, - forwardComposerOpen: false - })); - }} - /> + {hasMultipleParticipants && ( + { + setMail((prev) => ({ + ...prev, + replyComposerOpen: false, + replyAllComposerOpen: true, + forwardComposerOpen: false + })); + }} + /> + )} Date: Tue, 15 Apr 2025 13:29:56 -0700 Subject: [PATCH 2/2] Remove decide function from createFeatureGate --- apps/mail/lib/flags.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/apps/mail/lib/flags.ts b/apps/mail/lib/flags.ts index ae0a1672f2..97e8143ee5 100644 --- a/apps/mail/lib/flags.ts +++ b/apps/mail/lib/flags.ts @@ -12,7 +12,4 @@ export const createFeatureGate = (key: string) => flag({ key, adapter: statsigAdapter.featureGate((gate) => gate.value, { exposureLogging: true }), identify, - decide() { - return Math.random() > 0.9; - }, }); \ No newline at end of file