Enable/disable spellchecker setting without relaunch
This commit is contained in:
parent
2277097f75
commit
acf7c74ea3
|
@ -1022,6 +1022,8 @@ ipcMain.handle('change-language', async (_: IpcMainInvokeEvent, value: string) =
|
|||
})
|
||||
|
||||
ipcMain.handle('toggle-spellchecker', async (_: IpcMainInvokeEvent, value: boolean) => {
|
||||
mainWindow?.webContents.session.setSpellCheckerEnabled(value)
|
||||
|
||||
const preferences = new Preferences(preferencesDBPath)
|
||||
const conf = await preferences.update({
|
||||
language: {
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
>{{ language.name }}</el-checkbox
|
||||
>
|
||||
</el-checkbox-group>
|
||||
<p class="notice">{{ $t('preferences.language.notice') }}</p>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
@ -76,9 +75,7 @@ export default {
|
|||
return this.$store.state.Preferences.Language.language.spellchecker.enabled
|
||||
},
|
||||
set(value) {
|
||||
this.$store.dispatch('Preferences/Language/toggleSpellchecker', value).then(() => {
|
||||
this.confirm()
|
||||
})
|
||||
this.$store.dispatch('Preferences/Language/toggleSpellchecker', value)
|
||||
}
|
||||
},
|
||||
spellcheckLanguages: {
|
||||
|
|
Loading…
Reference in New Issue