diff --git a/www/drive/main.js b/www/drive/main.js index 1cdda22f4..6cbad00ec 100644 --- a/www/drive/main.js +++ b/www/drive/main.js @@ -30,7 +30,7 @@ define([ editable: false, Cryptpad: Cryptpad, loggedIn: Cryptpad.isLoggedIn(), - mobile: $('body').width() <= 600 // Menu and content area are not inline-block anymore for mobiles + mobile: function () { return $('body').width() <= 600; } // Menu and content area are not inline-block anymore for mobiles }; var stringify = APP.stringify = function (obj) { @@ -801,7 +801,7 @@ define([ if (!path || path.length === 0) { return; } var isTrash = filesOp.isPathInTrash(path); var $title = $('', {'class': 'path unselectable'}); - if (APP.mobile) { + if (APP.mobile()) { return $title; } path.forEach(function (p, idx) { @@ -1170,7 +1170,7 @@ define([ var $toolbar = $driveToolbar; $toolbar.html(''); var $leftside = $('
', {'class': 'leftside'}).appendTo($toolbar); - if (!APP.mobile) { + if (!APP.mobile()) { $leftside.width($tree.width()); } var $rightside = $('
', {'class': 'rightside'}).appendTo($toolbar); @@ -1339,7 +1339,7 @@ define([ var $modeButton = createViewModeButton().appendTo($toolbar.find('.rightside')); var $title = createTitle(path).appendTo($toolbar.find('.rightside')); - if (APP.mobile) { + if (APP.mobile()) { var $context = $('