mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-03-09 00:10:31 -07:00
fix: type
This commit is contained in:
parent
8339db631e
commit
fbde09ad1f
2 changed files with 10 additions and 8 deletions
|
|
@ -38,9 +38,9 @@ export class View implements IViewService {
|
|||
|
||||
private initIPCHandlers(): void {
|
||||
// https://www.electronjs.org/docs/tutorial/online-offline-events
|
||||
ipcMain.handle(ViewChannel.onlineStatusChanged, (_event, online: boolean) => {
|
||||
ipcMain.handle(ViewChannel.onlineStatusChanged, async (_event, online: boolean) => {
|
||||
if (online) {
|
||||
this.reloadViewsWebContentsIfDidFailLoad();
|
||||
await this.reloadViewsWebContentsIfDidFailLoad();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -324,8 +324,9 @@ export class View implements IViewService {
|
|||
void session.fromPartition(`persist:${id}`).clearStorageData();
|
||||
if (view !== undefined) {
|
||||
// currently use workaround https://github.com/electron/electron/issues/10096
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
||||
(view as any).webContents.destroy();
|
||||
// @ts-expect-error Property 'destroy' does not exist on type 'WebContents'.ts(2339)
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
view.webContents.destroy();
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/no-dynamic-delete
|
||||
delete this.views[id];
|
||||
|
|
@ -354,8 +355,9 @@ export class View implements IViewService {
|
|||
public hibernateView = (id: string): void => {
|
||||
if (this.getView(id) !== undefined) {
|
||||
// currently use workaround https://github.com/electron/electron/issues/10096
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
|
||||
(this.getView(id) as any).webContents.destroy();
|
||||
// @ts-expect-error Property 'destroy' does not exist on type 'WebContents'.ts(2339)
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
||||
this.getView(id).webContents.destroy();
|
||||
this.removeView(id);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -73,8 +73,8 @@ export class WikiGitWorkspace implements IWikiGitWorkspaceService {
|
|||
if (workspace === undefined) {
|
||||
throw new Error(`Need to get workspace with id ${id} but failed`);
|
||||
}
|
||||
await this.wikiService.stopWatchWiki(workspace.name).catch((error) => logger.error((error as Error).message, error));
|
||||
await this.wikiService.stopWiki(workspace.name).catch((error: any) => logger.error((error as Error).message, error));
|
||||
await this.wikiService.stopWatchWiki(workspace.name).catch((error: Error) => logger.error(error.message, error));
|
||||
await this.wikiService.stopWiki(workspace.name).catch((error: Error) => logger.error(error.message, error));
|
||||
await this.wikiService.removeWiki(workspace.name, workspace.isSubWiki ? workspace.mainWikiToLink : undefined, response === 0);
|
||||
await this.workspaceViewService.removeWorkspaceView(id);
|
||||
await this.menuService.buildMenu();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue