diff --git a/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx b/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx index 1170be25bd..06db117bfd 100644 --- a/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx +++ b/apps/spreadsheeteditor/mobile/src/controller/CellEditor.jsx @@ -6,16 +6,23 @@ const CellEditor = props => { useEffect(() => { Common.Notifications.on('engineCreated', api => { api.asc_registerCallback('asc_onSelectionNameChanged', onApiCellSelection.bind(this)); + api.asc_registerCallback('asc_onSelectionChanged', onApiSelectionChanged.bind(this)); }); }, []); const [cellName, setCellName] = useState(''); + const [stateCoauth, setCoauthDisabled] = useState(null); const onApiCellSelection = info => { setCellName(typeof(info)=='string' ? info : info.asc_getName()); }; + const onApiSelectionChanged = info => { + setCoauthDisabled(info.asc_getLocked() === true || info.asc_getLockedTable() === true || info.asc_getLockedPivotTable()===true); + } + return }; diff --git a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx index 9367e06a93..9e914b4bda 100644 --- a/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx +++ b/apps/spreadsheeteditor/mobile/src/view/CellEditor.jsx @@ -23,7 +23,7 @@ const CellEditorView = props => { return