mirror of
https://github.com/chinchang/web-maker.git
synced 2025-01-16 20:08:15 +01:00
import style.css n fix settings not updating correctly
This commit is contained in:
parent
f540ffb936
commit
4da8415636
@ -66,6 +66,7 @@ import {
|
||||
SHOW_KEYBOARD_SHORTCUTS_EVENT
|
||||
} from '../commands';
|
||||
import { commandPaletteService } from '../commandPaletteService';
|
||||
import './../style.css';
|
||||
|
||||
import { I18nProvider } from '@lingui/react';
|
||||
|
||||
@ -951,12 +952,14 @@ export default class App extends Component {
|
||||
* Handles all user triggered preference changes in the UI.
|
||||
*/
|
||||
updateSetting(settingName, value) {
|
||||
const prefs = { ...this.state.prefs };
|
||||
|
||||
// If this was triggered from user interaction, save the setting
|
||||
if (settingName) {
|
||||
// var settingName = e.target.dataset.setting;
|
||||
var obj = {};
|
||||
log(settingName, value);
|
||||
const prefs = { ...this.state.prefs };
|
||||
// const prefs = { ...this.state.prefs };
|
||||
prefs[settingName] = value;
|
||||
obj[settingName] = prefs[settingName];
|
||||
this.setState({ prefs });
|
||||
@ -983,9 +986,7 @@ export default class App extends Component {
|
||||
trackEvent('ui', 'updatePref-' + settingName, prefs[settingName]);
|
||||
}
|
||||
|
||||
const prefs = this.state.prefs;
|
||||
|
||||
this.contentWrap.applyCodemirrorSettings(this.state.prefs);
|
||||
this.contentWrap.applyCodemirrorSettings(prefs);
|
||||
|
||||
if (prefs.autoSave) {
|
||||
if (!this.autoSaveInterval) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user