[SSE mobile] Fix Bug 52277

This commit is contained in:
SergeyEzhin 2021-08-31 16:01:44 +03:00
parent c12e2d1525
commit a160b89aba
2 changed files with 9 additions and 8 deletions

View file

@ -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);
}

View file

@ -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 (
<Fragment>
<View id="idx-statusbar" className="statusbar" style={viewStyle}>
<div id="idx-box-add-tab" className={`${isWorkbookLocked ? 'disabled' : ''}`}>
<Link href={false} id="idx-btn-addtab" className={`tab${isWorkbookLocked ? ' disabled' : ''}`} onClick={props.onAddTabClicked}>
<div id="idx-box-add-tab" className={`${isDisconnected ? 'disabled' : ''}`}>
<Link href={false} id="idx-btn-addtab" className={`tab${isDisconnected ? ' disabled' : ''}`} onClick={props.onAddTabClicked}>
<Icon className="icon icon-plus" />
</Link>
</div>