bugfix: [48]; win应用搜索出现卸载应用问题。

ref: 优化rubick removeFeature API
This commit is contained in:
muwoo
2021-09-28 11:25:51 +08:00
parent 79b60b89a5
commit 50452bc36b
3 changed files with 5 additions and 11 deletions

View File

@@ -225,10 +225,12 @@ window.rubick = {
isDarkColors() {
return false;
},
features: [],
getFeatures() {
ipcRenderer.sendToHost('getFeatures');
return new Promise(resolve => {
ipcRenderer.on(`msg-back-getFeatures`, (e, result) => {
rubick.features = result;
resolve(result);
});
});
@@ -239,7 +241,7 @@ window.rubick = {
removeFeature(code) {
ipcRenderer.sendToHost('removeFeature', {code});
return true;
return !!rubick.features.filter(fe => fe.code === code).length;
},
// 系统
shellOpenExternal(url) {