Skip to content

Commit 40c9023

Browse files
authored
fix(navigation): hide home and network views when last cached package is removed (#708)
1 parent b8c7ddf commit 40c9023

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

public/main.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@ async function onSocketInitOrReload(event) {
179179
drillBreadcrumb.packages = cache.filter((pkg) => pkg.spec !== window.activePackage);
180180
searchview.cachedSpecs = cache;
181181
searchview.reset();
182+
183+
if (data.status === "RELOAD" && cache.length === 0) {
184+
window.navigation.hideMenu("network--view");
185+
window.navigation.hideMenu("home--view");
186+
window.navigation.hideMenu("warnings--view");
187+
window.navigation.setNavByName("search--view");
188+
}
189+
182190
dispatchSearchCommandInit();
183191
}
184192

0 commit comments

Comments
 (0)