Skip to content

Commit

Permalink
ref: getPath 改成同步
Browse files Browse the repository at this point in the history
  • Loading branch information
muwoo committed Jul 12, 2021
1 parent fbecd3b commit b51da48
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions static/preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,16 +105,7 @@ window.utools = window.rubick = {
},

getPath(name) {
ipcRenderer.send('msg-trigger', {
type: 'getPath',
name,
});
return new Promise((resolve, reject) => {
ipcRenderer.on(`msg-back-getPath`, (e, result) => {
console.log(result)
result ? resolve(result) : reject();
});
})
return remote.app.getPath(name);
},

showNotification(body, clickFeatureCode) {
Expand Down

0 comments on commit b51da48

Please sign in to comment.