From 8077942e2411e5bf0e9e11a070d7844b0f5b711c Mon Sep 17 00:00:00 2001 From: Timothy Cardoza Date: Fri, 20 Mar 2026 16:33:32 -0500 Subject: [PATCH] made collapse only availible when shared --- src/store/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/store/index.ts b/src/store/index.ts index 8c1d6df..ec50ae7 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -905,9 +905,11 @@ export const dismissTaskUpdateIndicator = (taskId: string, updatedAt: string) => export const isTaskCollaborativelyShared = (task: Task) => task.shareRefs.some(ref => { + const currentUserId = pb.authStore.model?.id; const context = getContextByRef(ref); const policy = context?.policy || (ref.kind === "user" ? "collaborative" : "handoff"); - return policy === "collaborative"; + const targetUserId = context?.targetUserId || null; + return ref.kind === "user" && policy === "collaborative" && !!targetUserId && targetUserId !== currentUserId; }); export const isTaskCollapsedUntilUpdated = (task: Task) =>