updated window docking logic

This commit is contained in:
Eugene Pankov
2021-12-15 23:21:56 +01:00
parent 899484a5d9
commit 0e9723cb3b
6 changed files with 78 additions and 47 deletions

View File

@@ -16,7 +16,7 @@ export interface PluginInfo {
export interface BootstrapData {
config: Record<string, any>
executable: string
isFirstWindow: boolean
isMainWindow: boolean
windowID: number
installedPlugins: PluginInfo[]
userPluginsPath: string

View File

@@ -89,7 +89,7 @@ export class AppService {
}, 30000)
config.ready$.toPromise().then(async () => {
if (this.bootstrapData.isFirstWindow) {
if (this.bootstrapData.isMainWindow) {
if (config.store.recoverTabs) {
const tabs = await this.tabRecovery.recoverTabs()
for (const tab of tabs) {
@@ -115,7 +115,7 @@ export class AppService {
this.tabsChanged.next()
this.tabOpened.next(tab)
if (this.bootstrapData.isFirstWindow) {
if (this.bootstrapData.isMainWindow) {
tab.recoveryStateChangedHint$.subscribe(() => {
this.tabRecovery.saveTabs(this.tabs)
})