Remove unnecessary functions
apiOptionsSet not required in bg/js/api.js after optionsSave; optionsSave already invokes apiOptionsSet. apiOptionsSet not required in fg/js/api.js since it's never invoked by the foreground. optionsSet handler not required in bg/js/backend.js since the message is never sent by the foreground.
This commit is contained in:
parent
35ca0f35dd
commit
13b184707b
@ -138,7 +138,6 @@ async function apiCommandExec(command) {
|
|||||||
const options = apiOptionsGetSync();
|
const options = apiOptionsGetSync();
|
||||||
options.general.enable = !options.general.enable;
|
options.general.enable = !options.general.enable;
|
||||||
await optionsSave(options);
|
await optionsSave(options);
|
||||||
await apiOptionsSet(options);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -85,10 +85,6 @@ class Backend {
|
|||||||
forward(apiOptionsGet(), callback);
|
forward(apiOptionsGet(), callback);
|
||||||
},
|
},
|
||||||
|
|
||||||
optionsSet: ({options, callback}) => {
|
|
||||||
forward(apiOptionsSet(options), callback);
|
|
||||||
},
|
|
||||||
|
|
||||||
kanjiFind: ({text, callback}) => {
|
kanjiFind: ({text, callback}) => {
|
||||||
forward(apiKanjiFind(text), callback);
|
forward(apiKanjiFind(text), callback);
|
||||||
},
|
},
|
||||||
|
@ -17,10 +17,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
function apiOptionsSet(options) {
|
|
||||||
return utilInvoke('optionsSet', {options});
|
|
||||||
}
|
|
||||||
|
|
||||||
function apiOptionsGet() {
|
function apiOptionsGet() {
|
||||||
return utilInvoke('optionsGet');
|
return utilInvoke('optionsGet');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user