diff --git a/desktop/src/renderer/components/workspaces/sidebars/sidebar-chat-item.tsx b/desktop/src/renderer/components/workspaces/sidebars/sidebar-chat-item.tsx
index c79d3282..e7d8c834 100644
--- a/desktop/src/renderer/components/workspaces/sidebars/sidebar-chat-item.tsx
+++ b/desktop/src/renderer/components/workspaces/sidebars/sidebar-chat-item.tsx
@@ -5,13 +5,15 @@ import { Avatar } from '@/renderer/components/avatars/avatar';
interface SidebarChatItemProps {
node: SidebarChatNode;
+ isActive?: boolean;
}
export const SidebarChatItem = ({
node,
+ isActive,
}: SidebarChatItemProps): React.ReactNode => {
- const isActive = false;
- const isUnread = node.unreadCount > 0 || node.mentionsCount > 0;
+ const isUnread =
+ !isActive && (node.unreadCount > 0 || node.mentionsCount > 0);
return (
{
const workspace = useWorkspace();
+ const { nodeId } = useParams<{ nodeId?: string | null }>();
+
const { data } = useQuery({
type: 'sidebar_chat_list',
userId: workspace.userId,
@@ -30,11 +33,12 @@ export const SidebarChats = () => {
{data?.map((item) => (
{
workspace.navigateToNode(item.id);
}}
>
-
+
))}
diff --git a/desktop/src/renderer/components/workspaces/sidebars/sidebar-item.tsx b/desktop/src/renderer/components/workspaces/sidebars/sidebar-item.tsx
index 91ef35cb..f463901c 100644
--- a/desktop/src/renderer/components/workspaces/sidebars/sidebar-item.tsx
+++ b/desktop/src/renderer/components/workspaces/sidebars/sidebar-item.tsx
@@ -5,11 +5,15 @@ import { Avatar } from '@/renderer/components/avatars/avatar';
interface SidebarItemProps {
node: SidebarNode;
+ isActive?: boolean;
}
-export const SidebarItem = ({ node }: SidebarItemProps): React.ReactNode => {
- const isActive = false;
- const isUnread = node.unreadCount > 0 || node.mentionsCount > 0;
+export const SidebarItem = ({
+ node,
+ isActive,
+}: SidebarItemProps): React.ReactNode => {
+ const isUnread =
+ !isActive && (node.unreadCount > 0 || node.mentionsCount > 0);
return (