fix(desktop): preserve sidebar groups on reload
This commit is contained in:
1 parent
1317301bcd
commit
65a92afce8
2 files changed
+60
-1
No files matched your search
@@ -4926,9 +4926,10 @@ export const useConnectionStore = defineStore("connection", () => {
|
||||
const saved = await api.loadConnections();
|
||||
connections.value = saved.map(normalizeConnection);
|
||||
const savedLayout = await api.loadSidebarLayout();
|
||||
const currentLayout = sidebarLayout.value.groups.length || sidebarLayout.value.order.length ? sidebarLayout.value : null;
|
||||
sidebarLayout.value = reconcileLayout(
|
||||
connections.value.map((c) => c.id),
|
||||
savedLayout,
|
||||
savedLayout ?? currentLayout,
|
||||
);
|
||||
rebuildTreeNodes();
|
||||
})().finally(() => {
|
||||
|
||||
Reference in new issue
Block a user