mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 10:59:28 +08:00
[PE mobile] Correct application settings
This commit is contained in:
@ -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;
|
||||
export default inject("storeApplicationSettings")(observer(ApplicationSettingsController));
|
||||
Reference in New Issue
Block a user