From f772b15fba70ae9e5651584404df46513abbcb2d Mon Sep 17 00:00:00 2001 From: CowboySticky Date: Sat, 27 Jul 2024 21:16:36 -0500 Subject: [PATCH] This ensures that the current user is shown correc -tly based on the configuration settings. --- apps/desktop/src/views/channel.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/desktop/src/views/channel.tsx b/apps/desktop/src/views/channel.tsx index 242c3762..3f190081 100644 --- a/apps/desktop/src/views/channel.tsx +++ b/apps/desktop/src/views/channel.tsx @@ -12,13 +12,16 @@ export const ChannelView = ({ alignDirection }: { alignDirection: DirectionLR }) const allUsers = Object.entries(users); let userList = showOnlyTalkingUsers ? allUsers.filter(([, item]) => item.talking) : allUsers; - if (!showOwnUser) { - userList = userList.filter(([, item]) => item.id !== me?.id); - } + userList = userList.filter(([, item]) => { + if (item.id === me?.id) { + return showOwnUser && (showOnlyTalkingUsers ? item.talking : true); + } + return true; + }); return (
-
+
{userList.map(([, item]) => ( ))}