[MM-39160] Remove view from closedViews when it's automatically opened (#1791)

This commit is contained in:
Devin Binnie
2021-10-06 17:05:07 -04:00
committed by GitHub
parent 3527679648
commit 48cf6fd788

View File

@@ -76,6 +76,9 @@ export class ViewManager {
this.closedViews.set(tabView.name, {srv, tab});
return;
}
if (this.closedViews.has(tabView.name)) {
this.closedViews.delete(tabView.name);
}
const view = new MattermostView(tabView, serverInfo, this.mainWindow, this.viewOptions);
this.views.set(tabView.name, view);
this.showByName(tabView.name);
@@ -237,7 +240,6 @@ export class ViewManager {
}
const {srv, tab} = this.closedViews.get(name)!;
tab.isOpen = true;
this.closedViews.delete(name);
this.loadView(srv, new ServerInfo(srv), tab, url);
this.showByName(name);
const view = this.views.get(name)!;