From ef1eb744865b2a6dd9cc38016330714287030b35 Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 7 Aug 2021 23:04:44 +0100 Subject: [PATCH] Don't show server mark as read on channels. --- src/lib/ContextMenus.tsx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/lib/ContextMenus.tsx b/src/lib/ContextMenus.tsx index c3b33e1f..2dad2082 100644 --- a/src/lib/ContextMenus.tsx +++ b/src/lib/ContextMenus.tsx @@ -559,18 +559,18 @@ function ContextMenus(props: Props) { : 0) || 0; const userPermissions = (user ? user.permission : 0) || 0; - if (channel && unread) { - generateAction({ action: "mark_as_read", channel }); - } - - if (server && unread) { - generateAction( - { - action: "mark_server_as_read", - server, - }, - "mark_as_read", - ); + if (unread) { + if (channel) { + generateAction({ action: "mark_as_read", channel }); + } else if (server) { + generateAction( + { + action: "mark_server_as_read", + server, + }, + "mark_as_read", + ); + } } if (contextualChannel) {