From 13b184707b1bb0c5150645d6cdd186accb345f60 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Fri, 6 Sep 2019 21:06:45 -0400 Subject: [PATCH] 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. --- ext/bg/js/api.js | 1 - ext/bg/js/backend.js | 4 ---- ext/fg/js/api.js | 4 ---- 3 files changed, 9 deletions(-) diff --git a/ext/bg/js/api.js b/ext/bg/js/api.js index 7126cab7..ff54ae81 100644 --- a/ext/bg/js/api.js +++ b/ext/bg/js/api.js @@ -138,7 +138,6 @@ async function apiCommandExec(command) { const options = apiOptionsGetSync(); options.general.enable = !options.general.enable; await optionsSave(options); - await apiOptionsSet(options); } }; diff --git a/ext/bg/js/backend.js b/ext/bg/js/backend.js index 39fd4288..c1cef0c5 100644 --- a/ext/bg/js/backend.js +++ b/ext/bg/js/backend.js @@ -85,10 +85,6 @@ class Backend { forward(apiOptionsGet(), callback); }, - optionsSet: ({options, callback}) => { - forward(apiOptionsSet(options), callback); - }, - kanjiFind: ({text, callback}) => { forward(apiKanjiFind(text), callback); }, diff --git a/ext/fg/js/api.js b/ext/fg/js/api.js index 6bcb0dbb..aa3b2629 100644 --- a/ext/fg/js/api.js +++ b/ext/fg/js/api.js @@ -17,10 +17,6 @@ */ -function apiOptionsSet(options) { - return utilInvoke('optionsSet', {options}); -} - function apiOptionsGet() { return utilInvoke('optionsGet'); }