diff --git a/apps/documenteditor/mobile/src/store/ApiRegisterCallback.js b/apps/documenteditor/mobile/src/store/ApiRegisterCallback.js deleted file mode 100644 index 6fddbaae7..000000000 --- a/apps/documenteditor/mobile/src/store/ApiRegisterCallback.js +++ /dev/null @@ -1,9 +0,0 @@ -import React from "react"; -import { resetPageOrient } from "../store/actions/actions"; - -export default function (dispatch, getState, api) { - // document settings - api.asc_registerCallback('asc_onPageOrient', (isPortrait) => { - dispatch(resetPageOrient(isPortrait === true)); - }); -} \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/store/actions/actions.js b/apps/documenteditor/mobile/src/store/actions/actions.js deleted file mode 100644 index 916929937..000000000 --- a/apps/documenteditor/mobile/src/store/actions/actions.js +++ /dev/null @@ -1,30 +0,0 @@ -import registerApi from '../ApiRegisterCallback'; - -export const INIT_API = 'INIT_API'; -export const initApi = value => { - return (dispatch, getState) => { - registerApi(dispatch, getState, value); - dispatch({ - type: INIT_API, - api: value - }); - } -}; - -// action of settings -export const RESET_PAGE_ORIENT = 'RESET_PAGE_ORIENT'; -export const resetPageOrient = value => { - return { - type: RESET_PAGE_ORIENT, - isPortrait: value - } -}; -export const changePageOrient = (value) => { - return (dispatch, getState) => { - const { api } = getState(); - if (api.apiObj) { - api.apiObj.change_PageOrient(value); - } - }; -}; - diff --git a/apps/documenteditor/mobile/src/store/actions/settings.js b/apps/documenteditor/mobile/src/store/actions/settings.js deleted file mode 100644 index efc934149..000000000 --- a/apps/documenteditor/mobile/src/store/actions/settings.js +++ /dev/null @@ -1,10 +0,0 @@ -// action types -export const RESET_PAGE_ORIENT = 'RESET_PAGE_ORIENT'; - -// action creators -export const resetPageOrient = value => { - return { - type: RESET_PAGE_ORIENT, - isPortrait: value - } -}; \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/store/reducers/initApi.js b/apps/documenteditor/mobile/src/store/reducers/initApi.js deleted file mode 100644 index 732cc18e2..000000000 --- a/apps/documenteditor/mobile/src/store/reducers/initApi.js +++ /dev/null @@ -1,12 +0,0 @@ -import { INIT_API } from '../actions/actions' - -const apiReducer = (state = [], action) => { - if (action.type == INIT_API) { - return Object.assign({}, state, { - apiObj: action.api - }); - } - return state; -}; - -export default apiReducer ; \ No newline at end of file diff --git a/apps/documenteditor/mobile/src/store/reducers/settings.js b/apps/documenteditor/mobile/src/store/reducers/settings.js deleted file mode 100644 index cda8b5af8..000000000 --- a/apps/documenteditor/mobile/src/store/reducers/settings.js +++ /dev/null @@ -1,12 +0,0 @@ -import { RESET_PAGE_ORIENT } from '../actions/actions' - -const settingsReducer = (state = [], action) => { - if (action.type == RESET_PAGE_ORIENT) { - return Object.assign({}, state, { - isPortrait: action.isPortrait - }); - } - return state; -}; - -export default settingsReducer ; \ No newline at end of file