[DE mobile] Fix Bug 60365

This commit is contained in:
SergeyEzhin 2022-12-27 23:16:46 +04:00
parent a7255d1dd4
commit e87995d33a
2 changed files with 6 additions and 3 deletions

View file

@ -236,6 +236,9 @@ class MainController extends Component {
const appOptions = this.props.storeAppOptions;
const appSettings = this.props.storeApplicationSettings;
const storeDocumentInfo = this.props.storeDocumentInfo;
const dataDoc = storeDocumentInfo.dataDoc;
const isExtRestriction = dataDoc.fileType !== 'oform';
f7.emit('resize');
@ -268,7 +271,7 @@ class MainController extends Component {
value = LocalStorage.getBool('mobile-view', true);
if(value) {
if(value && isExtRestriction) {
this.api.ChangeReaderMode();
} else {
appOptions.changeMobileView();

View file

@ -8,7 +8,7 @@ const ToolbarView = props => {
const { t } = useTranslation();
const isDisconnected = props.isDisconnected;
const docExt = props.docExt;
const isAvailableExt = docExt && docExt !== 'djvu' && docExt !== 'pdf' && docExt !== 'xps';
const isAvailableExt = docExt && docExt !== 'djvu' && docExt !== 'pdf' && docExt !== 'xps' && docExt !== 'oform';
const disableEditBtn = props.isObjectLocked || props.stateDisplayMode || props.disabledEditControls || isDisconnected;
const isViewer = props.isViewer;
const isMobileView = props.isMobileView;
@ -62,7 +62,7 @@ const ToolbarView = props => {
onRedoClick: props.onRedo
})}
{/*isAvailableExt && !props.disabledControls &&*/}
{(isViewer || !Device.phone) && <Link className={(!isAvailableExt || props.disabledControls) && 'disabled'} icon={isMobileView ? 'icon-standard-view' : 'icon-mobile-view'} href={false} onClick={() => {
{((isViewer || !Device.phone) && isAvailableExt) && <Link className={props.disabledControls && 'disabled'} icon={isMobileView ? 'icon-standard-view' : 'icon-mobile-view'} href={false} onClick={() => {
props.changeMobileView();
props.openOptions('snackbar');
}}></Link>}