made collapse only availible when shared
This commit is contained in:
+3
-1
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user