From 59790e38dabb292d940b74acfff6e112a857bc1b Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Mon, 19 May 2025 16:10:51 +0530 Subject: [PATCH] fix: editor loads with private note color --- app/javascript/ui/LiteReplyBox.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/javascript/ui/LiteReplyBox.vue b/app/javascript/ui/LiteReplyBox.vue index a869301a1..0699cea6d 100644 --- a/app/javascript/ui/LiteReplyBox.vue +++ b/app/javascript/ui/LiteReplyBox.vue @@ -54,9 +54,16 @@ export default { return true; }, isPrivate() { - if (this.currentChat.can_reply || this.isAWhatsAppChannel) { + // if the current chat is not loaded, assume we can reply + // this avoids rendering the editor with is-private yellow bg + // optimisitaclly defaulting to reply editor + if (!this.currentChat || !Object.keys(this.currentChat).length) + return false; + + if (this.currentChat.can_reply) { return this.isOnPrivateNote; } + return true; }, inboxId() {