mirror of
https://github.com/multica-ai/multica.git
synced 2026-08-02 18:13:27 +02:00
fix(desktop): recalculate tabs after pin layout changes
This commit is contained in:
@@ -464,6 +464,9 @@ export function TabBar() {
|
||||
const activeTabId = group?.activeTabId ?? "";
|
||||
const tabIds = tabs.map((t) => t.id);
|
||||
const tabOrder = tabIds.join("\0");
|
||||
const tabLayoutKey = tabs
|
||||
.map((tab) => `${tab.id}:${tab.pinned ? "pinned" : "unpinned"}`)
|
||||
.join("\0");
|
||||
const addedTabIds = getAddedTabIds(
|
||||
previousTabsRef.current,
|
||||
activeWorkspaceSlug,
|
||||
@@ -502,7 +505,13 @@ export function TabBar() {
|
||||
}
|
||||
|
||||
keepTabVisible(tabScrollRef.current);
|
||||
}, [activeWorkspaceSlug, activeTabId, shouldReduceMotion, tabOrder]);
|
||||
}, [
|
||||
activeWorkspaceSlug,
|
||||
activeTabId,
|
||||
shouldReduceMotion,
|
||||
tabLayoutKey,
|
||||
tabOrder,
|
||||
]);
|
||||
|
||||
useEffect(() => {
|
||||
const scroller = tabScrollRef.current;
|
||||
|
||||
Reference in New Issue
Block a user