mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-30 04:11:33 -08:00
fix: reduce deps in preload script due to sandbox
This commit is contained in:
parent
f7fa98f2b7
commit
2d6741a7b8
2 changed files with 4 additions and 4 deletions
|
|
@ -5,7 +5,6 @@
|
|||
* This file should be required by view.ts preload script to work
|
||||
*/
|
||||
import { ipcRenderer, webFrame } from 'electron';
|
||||
import { delay } from 'bluebird';
|
||||
import { WikiChannel } from '@/constants/channels';
|
||||
import { native } from './common/services';
|
||||
|
||||
|
|
@ -51,8 +50,9 @@ ipcRenderer.on(WikiChannel.addTiddler, async (event, title: string, text: string
|
|||
$tw.wiki.addTiddler({ title: '${title}', text: '${text}', ...${extraMeta} });
|
||||
`);
|
||||
// wait for fs to be settle
|
||||
await delay(1000);
|
||||
await ipcRenderer.invoke(WikiChannel.addTiddlerDone);
|
||||
setTimeout(() => {
|
||||
ipcRenderer.invoke(WikiChannel.addTiddlerDone);
|
||||
}, 1000);
|
||||
});
|
||||
// get tiddler text
|
||||
ipcRenderer.on(WikiChannel.getTiddlerText, async (event, nonceReceived: number, title: string) => {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { PreferenceSections } from '@services/preferences/interface';
|
||||
import type { PreferenceSections } from '@services/preferences/interface';
|
||||
|
||||
export enum WindowNames {
|
||||
about = 'about',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue