Skip to content

Commit

Permalink
skip sidebar tabs for sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
oxdc committed Oct 22, 2024
1 parent 3be1db7 commit 995b695
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/models/TabCache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,13 @@ export const useTabCache = create<TabCacheStore>()((set, get) => ({
for (const key of content.keys()) {
const entry = content.get(key);
newTabs.set(key, entry);
const group =
entry.group ||
(entry.leaves.length > 0 ? entry.leaves[0].parent : null);
if (group) newTabs.get(key).leaves = sortTabs(group, sortStrategy);
if (entry.groupType === GroupType.RootSplit) {
const group =
entry.group ||
(entry.leaves.length > 0 ? entry.leaves[0].parent : null);
if (group)
newTabs.get(key).leaves = sortTabs(group, sortStrategy);
}
}
set({ content: newTabs });
},
Expand Down

0 comments on commit 995b695

Please sign in to comment.