Remove getOptionsArray
This commit is contained in:
parent
ce51fe7eca
commit
17277a6450
@ -531,7 +531,7 @@ async function onDictionaryPurge(e) {
|
|||||||
dictionarySpinnerShow(true);
|
dictionarySpinnerShow(true);
|
||||||
|
|
||||||
await utilDatabasePurge();
|
await utilDatabasePurge();
|
||||||
for (const options of toIterable(await getOptionsArray())) {
|
for (const {options} of toIterable((await apiOptionsGetFull()).profiles)) {
|
||||||
options.dictionaries = utilBackgroundIsolate({});
|
options.dictionaries = utilBackgroundIsolate({});
|
||||||
options.general.mainDictionary = '';
|
options.general.mainDictionary = '';
|
||||||
}
|
}
|
||||||
@ -593,7 +593,7 @@ async function onDictionaryImport(e) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const {result, errors} = await utilDatabaseImport(files[i], updateProgress, importDetails);
|
const {result, errors} = await utilDatabaseImport(files[i], updateProgress, importDetails);
|
||||||
for (const options of toIterable(await getOptionsArray())) {
|
for (const {options} of toIterable((await apiOptionsGetFull()).profiles)) {
|
||||||
const dictionaryOptions = SettingsDictionaryListUI.createDictionaryOptions();
|
const dictionaryOptions = SettingsDictionaryListUI.createDictionaryOptions();
|
||||||
dictionaryOptions.enabled = true;
|
dictionaryOptions.enabled = true;
|
||||||
options.dictionaries[result.title] = dictionaryOptions;
|
options.dictionaries[result.title] = dictionaryOptions;
|
||||||
|
@ -16,11 +16,6 @@
|
|||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
async function getOptionsArray() {
|
|
||||||
const optionsFull = await apiOptionsGetFull();
|
|
||||||
return optionsFull.profiles.map((profile) => profile.options);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function formRead(options) {
|
async function formRead(options) {
|
||||||
options.general.enable = $('#enable').prop('checked');
|
options.general.enable = $('#enable').prop('checked');
|
||||||
options.general.showGuide = $('#show-usage-guide').prop('checked');
|
options.general.showGuide = $('#show-usage-guide').prop('checked');
|
||||||
|
Loading…
Reference in New Issue
Block a user