diff --git a/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx b/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx index d0f131594..c2d4bbab9 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/Statusbar.jsx @@ -23,10 +23,10 @@ const StatusbarController = inject('sheets', 'storeFocusObjects', 'users')(obser api.asc_registerCallback('asc_onActiveSheetChanged', onApiActiveSheetChanged); api.asc_registerCallback('asc_onHidePopMenu', onApiHideTabContextMenu); api.asc_registerCallback('asc_onUpdateTabColor', onApiUpdateTabColor); - // api.asc_registerCallback('asc_onCoAuthoringDisconnect', onApiDisconnect); + api.asc_registerCallback('asc_onCoAuthoringDisconnect', onApiDisconnect); }); Common.Notifications.on('document:ready', onApiSheetsChanged); - // Common.Notifications.on('api:disconnect', onApiDisconnect); + Common.Notifications.on('api:disconnect', onApiDisconnect); }); const onApiDisconnect = () => { @@ -180,7 +180,7 @@ const Statusbar = inject('sheets', 'storeAppOptions', 'users')(observer(props => if (index == api.asc_getActiveWorksheetIndex()) { if (!opened) { - if (isEdit && !sheets.isWorkbookLocked) { + if (isEdit && !isDisconnected) { api.asc_closeCellEditor(); f7.popover.open('#idx-tab-context-menu-popover', target); } diff --git a/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx b/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx index 0b566123f..6ae773384 100644 --- a/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/Statusbar.jsx @@ -8,22 +8,23 @@ const viewStyle = { height: 30 }; -const StatusbarView = inject('storeAppOptions', 'sheets')(observer(props => { +const StatusbarView = inject('storeAppOptions', 'sheets', 'users')(observer(props => { const { t } = useTranslation(); const _t = t('Statusbar', {returnObjects: true}); const isAndroid = Device.android; const isPhone = Device.isPhone; - const {sheets, storeAppOptions} = props; + const {sheets, storeAppOptions, users} = props; const allSheets = sheets.sheets; const hiddenSheets = sheets.hiddenWorksheets(); - const isWorkbookLocked = sheets.isWorkbookLocked; + // const isWorkbookLocked = sheets.isWorkbookLocked; const isEdit = storeAppOptions.isEdit; + const isDisconnected = users.isDisconnected; return ( -
- +
+