Skip to content

Commit

Permalink
fix: destroying dialogs
Browse files Browse the repository at this point in the history
  • Loading branch information
sentialx committed Sep 30, 2019
1 parent a3050d3 commit a40ccf0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/services/multrin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class Multrin {
this.appWindow = appWindow;

if (platform() === 'win32') {
this.activateWindowCapturing();
// this.activateWindowCapturing();
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/main/windows-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export class WindowsManager {
}

public addFavicon = async (url: string): Promise<string> => {
return new Promise(async (resolve, reject) => {
return new Promise(async resolve => {
if (!this.favicons.get(url)) {
try {
const res = await requestURL(url);
Expand Down Expand Up @@ -184,7 +184,7 @@ export class WindowsManager {

resolve(str);
} catch (e) {
reject(e);
throw e;
}
} else {
resolve(this.favicons.get(url));
Expand Down
14 changes: 13 additions & 1 deletion src/main/windows/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,21 @@ export class AppWindow extends BrowserWindow {
writeFileSync(windowDataPath, JSON.stringify(windowState));

this.menuDialog.destroy();
this.menuDialog = null;
this.searchDialog.destroy();
this.authDialog.destroy();
this.findDialog.destroy();
this.formFillDialog.destroy();
this.credentialsDialog.destroy();
this.permissionsDialog.destroy();

this.menuDialog = null;
this.searchDialog = null;
this.authDialog = null;
this.findDialog = null;
this.formFillDialog = null;
this.credentialsDialog = null;
this.permissionsDialog = null;

this.viewManager.clear();

if (
Expand Down

0 comments on commit a40ccf0

Please sign in to comment.