mirror of
https://github.com/openswarm-ai/openswarm.git
synced 2026-09-23 01:54:52 +02:00
[eric] canvas: layout load keeps exactly one fullscreen owner, so a pre-1.7.6 profile with a second persisted fullscreen entry can no longer drag cards while fullscreen
This commit is contained in:
@@ -1886,6 +1886,13 @@ const dashboardLayoutSlice = createSlice({
|
||||
for (const id of Object.keys(state.tiledCards)) {
|
||||
if (!tileOwnerExists(state, id)) delete state.tiledCards[id];
|
||||
}
|
||||
// Pre-1.7.6 profiles can persist several live 'fullscreen' entries; the selector crowns the first, so every OTHER card's drag guard compares against the wrong owner and lets the drag through. One owner, same rule as the write reducer.
|
||||
let fsOwner: string | null = null;
|
||||
for (const [id, zone] of Object.entries(state.tiledCards)) {
|
||||
if (zone !== 'fullscreen') continue;
|
||||
if (fsOwner === null) { fsOwner = id; continue; }
|
||||
delete state.tiledCards[id];
|
||||
}
|
||||
for (const id of Object.keys(state.minimizedCards)) {
|
||||
if (!tileOwnerExists(state, id)) delete state.minimizedCards[id];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user