diff --git a/app/assets/javascripts/views/editor/editor_view.ts b/app/assets/javascripts/views/editor/editor_view.ts index b653a739f..8f5a4eee2 100644 --- a/app/assets/javascripts/views/editor/editor_view.ts +++ b/app/assets/javascripts/views/editor/editor_view.ts @@ -108,10 +108,6 @@ class EditorViewCtrl extends PureViewCtrl { private removeComponentsObserver!: () => void; - prefKeyMonospace: string; - prefKeySpellcheck: string; - prefKeyMarginResizers: string; - /* @ngInject */ constructor($timeout: ng.ITimeoutService) { super($timeout); @@ -121,10 +117,6 @@ class EditorViewCtrl extends PureViewCtrl { this.rightPanelPuppet = { onReady: () => this.reloadPreferences(), }; - /** Used by .pug template */ - this.prefKeyMonospace = PrefKey.EditorMonospaceEnabled; - this.prefKeySpellcheck = PrefKey.EditorSpellcheck; - this.prefKeyMarginResizers = PrefKey.EditorResizersEnabled; this.editorMenuOnSelect = this.editorMenuOnSelect.bind(this); this.onPanelResizeFinish = this.onPanelResizeFinish.bind(this); @@ -722,30 +714,6 @@ class EditorViewCtrl extends PureViewCtrl { } } - async toggleWebPrefKey(key: PrefKey) { - const currentValue = (this.state as any)[key]; - await this.application.setPreference(key, !currentValue); - await this.setState({ - [key]: !currentValue, - }); - this.reloadFont(); - - if (key === PrefKey.EditorSpellcheck) { - /** Allows textarea to reload */ - await this.setState({ textareaUnloading: true }); - await this.setState({ textareaUnloading: false }); - this.reloadFont(); - } else if ( - key === PrefKey.EditorResizersEnabled && - this.state[key] === true - ) { - this.$timeout(() => { - this.leftPanelPuppet!.flash!(); - this.rightPanelPuppet!.flash!(); - }); - } - } - /** @components */ registerComponentHandler() {