[PE mobile] Correct application settings
This commit is contained in:
parent
9f50f96c27
commit
f9aefa5170
|
@ -1,10 +1,19 @@
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { ApplicationSettings } from "../../view/settings/ApplicationSettings";
|
import { ApplicationSettings } from "../../view/settings/ApplicationSettings";
|
||||||
import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage';
|
import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage';
|
||||||
|
import {observer, inject} from "mobx-react";
|
||||||
|
|
||||||
class ApplicationSettingsController extends Component {
|
class ApplicationSettingsController extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
||||||
|
const valueUnitMeasurement = LocalStorage.getItem("pe-mobile-settings-unit");
|
||||||
|
const valueSpellCheck = LocalStorage.getBool("pe-mobile-spellcheck");
|
||||||
|
const valueMacrosMode = LocalStorage.getItem("pe-mobile-macros-mode");
|
||||||
|
|
||||||
|
typeof valueUnitMeasurement !== 'undefined' && this.props.storeApplicationSettings.changeUnitMeasurement(valueUnitMeasurement);
|
||||||
|
typeof valueSpellCheck !== 'undefined' && this.props.storeApplicationSettings.changeSpellCheck(valueSpellCheck);
|
||||||
|
typeof valueMacrosMode !== 'undefined' && this.props.storeApplicationSettings.changeMacrosSettings(valueMacrosMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
setUnitMeasurement(value) {
|
setUnitMeasurement(value) {
|
||||||
|
@ -37,4 +46,4 @@ class ApplicationSettingsController extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export default ApplicationSettingsController;
|
export default inject("storeApplicationSettings")(observer(ApplicationSettingsController));
|
Loading…
Reference in a new issue