diff --git a/apps/presentationeditor/mobile/src/controller/settings/ApplicationSettings.jsx b/apps/presentationeditor/mobile/src/controller/settings/ApplicationSettings.jsx index bc72b63bb..44d520fa1 100644 --- a/apps/presentationeditor/mobile/src/controller/settings/ApplicationSettings.jsx +++ b/apps/presentationeditor/mobile/src/controller/settings/ApplicationSettings.jsx @@ -1,10 +1,19 @@ import React, { Component } from "react"; import { ApplicationSettings } from "../../view/settings/ApplicationSettings"; import { LocalStorage } from '../../../../../common/mobile/utils/LocalStorage'; +import {observer, inject} from "mobx-react"; class ApplicationSettingsController extends Component { constructor(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) { @@ -37,4 +46,4 @@ class ApplicationSettingsController extends Component { } -export default ApplicationSettingsController; \ No newline at end of file +export default inject("storeApplicationSettings")(observer(ApplicationSettingsController)); \ No newline at end of file