diff options
| author | lain <lain@soykaf.club> | 2020-06-05 13:42:39 +0200 |
|---|---|---|
| committer | lain <lain@soykaf.club> | 2020-06-05 13:42:39 +0200 |
| commit | 282e10e3bec1a76da2d4c2a89152b441a2273fb7 (patch) | |
| tree | 5ba1ce3202724c7905eaa4bb0a888390a56e9a54 | |
| parent | 585bb5727a47ccea1257cb41ca5234342d630bcb (diff) | |
Settings: Keep a local version of the mutedWordsString
Without this it was impossible to use newlines
| -rw-r--r-- | src/components/settings/settings.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 31a9e9be..5d01a05f 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -30,7 +30,8 @@ const settings = { Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks'), backendVersion: instance.backendVersion, - frontendVersion: instance.frontendVersion + frontendVersion: instance.frontendVersion, + muteWordsStringLocal: this.$store.getters.mergedConfig.muteWords.join('\n') } }, components: { @@ -86,8 +87,11 @@ const settings = { .reduce((acc, [key, value]) => ({ ...acc, [key]: value }), {}), // Special cases (need to transform values or perform actions first) muteWordsString: { - get () { return this.$store.getters.mergedConfig.muteWords.join('\n') }, + get () { + return this.muteWordsStringLocal + }, set (value) { + this.muteWordsStringLocal = value this.$store.dispatch('setOption', { name: 'muteWords', value: filter(value.split('\n'), (word) => trim(word).length > 0) |
