summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--packages/app/src/context/layout.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/packages/app/src/context/layout.tsx b/packages/app/src/context/layout.tsx
index 97d9cacbb..cacc875c5 100644
--- a/packages/app/src/context/layout.tsx
+++ b/packages/app/src/context/layout.tsx
@@ -391,7 +391,14 @@ export const { use: useLayout, provider: LayoutProvider } = createSimpleContext(
? globalSync.data.project.find((x) => x.id === projectID)
: globalSync.data.project.find((x) => x.worktree === project.worktree)
- return { ...metadata, ...project }
+ // Preserve local icon override from per-workspace localStorage cache (childStore.icon).
+ // Without this, different subdirectories of the same git repo would share the same
+ // icon from the database instead of using their individual overrides.
+ const base = { ...metadata, ...project }
+ if (childStore.icon) {
+ return { ...base, icon: { ...base.icon, override: childStore.icon } }
+ }
+ return base
}
const roots = createMemo(() => {