fixed starring tasks
CI / build (push) Has been skipped
CI / deploy (push) Successful in 1m3s

This commit is contained in:
2026-03-20 16:36:06 -05:00
parent 8077942e24
commit 5a3cf8cde3
+6 -1
View File
@@ -2578,6 +2578,8 @@ export const updateTask = async (id: string, updates: Partial<Task>) => {
}
if (currentTask) {
let favoriteTagOverride: string | null | undefined;
if (finalUpdates.tags) {
const parsedTags = parseTags(finalUpdates.tags);
finalUpdates.labelTags = parsedTags.filter(tag => tag.kind === "label").map(tag => tag.display);
@@ -2600,10 +2602,13 @@ export const updateTask = async (id: string, updates: Partial<Task>) => {
key: tag.key
} satisfies NoteRef;
});
favoriteTagOverride = finalUpdates.tags.find(tag => tag.endsWith("_favorite__")) || null;
}
if (finalUpdates.labelTags || finalUpdates.shareRefs || finalUpdates.noteRefs) {
const favoriteTag = currentTask.tags.find(tag => tag.endsWith("_favorite__"));
const favoriteTag = favoriteTagOverride !== undefined
? favoriteTagOverride || undefined
: currentTask.tags.find(tag => tag.endsWith("_favorite__"));
finalUpdates.tags = buildTaskTags(
finalUpdates.labelTags || currentTask.labelTags,
finalUpdates.shareRefs || currentTask.shareRefs,