Skip to content

Commit

Permalink
Merge pull request #5244 from systeminit/tidy/a-small-bit-of-views-cl…
Browse files Browse the repository at this point in the history
…eanup

Tidy: small bit of views cleanup
  • Loading branch information
jobelenus authored Jan 13, 2025
2 parents 729bf40 + b447e25 commit bbc8ac3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/web/src/store/views.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1938,8 +1938,6 @@ export const useViewsStore = (forceChangeSetId?: ChangeSetId) => {
componentType: ComponentType.View,
});
if (view) view.viewNodes[payload.viewObjectId] = node;
if (payload.viewId === this.selectedViewId)
this.viewNodes[payload.viewObjectId] = node;
}
},
},
Expand All @@ -1949,8 +1947,6 @@ export const useViewsStore = (forceChangeSetId?: ChangeSetId) => {
if (metadata.change_set_id !== changeSetId) return;
const view = this.viewsById[payload.viewId];
if (view) delete view.viewNodes[payload.viewObjectId];
if (payload.viewId === this.selectedViewId)
delete this.viewNodes[payload.viewObjectId];
},
},

Expand All @@ -1972,7 +1968,6 @@ export const useViewsStore = (forceChangeSetId?: ChangeSetId) => {
size: geo.height * geo.width,
zIndex: 0,
};
this.setGroupZIndex();
} else view.components[componentId] = geo;
if (geo) {
for (const [key, loc] of Object.entries(
Expand All @@ -1988,6 +1983,8 @@ export const useViewsStore = (forceChangeSetId?: ChangeSetId) => {
});
},
);

this.setGroupZIndex();
},
},
],
Expand Down

0 comments on commit bbc8ac3

Please sign in to comment.