Disable background clipboard monitor, mecab, and anki if disabled (#1977)

This commit is contained in:
toasted-nutbread 2021-10-03 16:46:22 -04:00 committed by GitHub
parent be8ef53e90
commit e3986196e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -978,12 +978,14 @@ class Backend {
const options = this._getProfileOptions({current: true}); const options = this._getProfileOptions({current: true});
this._updateBadge(); this._updateBadge();
const enabled = options.general.enable;
this._anki.server = options.anki.server; this._anki.server = options.anki.server;
this._anki.enabled = options.anki.enable; this._anki.enabled = options.anki.enable && enabled;
this._mecab.setEnabled(options.parsing.enableMecabParser); this._mecab.setEnabled(options.parsing.enableMecabParser && enabled);
if (options.clipboard.enableBackgroundMonitor) { if (options.clipboard.enableBackgroundMonitor && enabled) {
this._clipboardMonitor.start(); this._clipboardMonitor.start();
} else { } else {
this._clipboardMonitor.stop(); this._clipboardMonitor.stop();