Merge pull request #379 from glowing-bear/sidebar-swipe-mobileonly

Don't hide the sidebar when "swiping" with the mouse on desktop
This commit is contained in:
David Cormier 2014-07-23 14:23:00 -04:00
commit a9758db585

View file

@ -885,8 +885,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
};
$scope.hideSidebar = function() {
document.getElementById('sidebar').setAttribute('data-state', 'hidden');
document.getElementById('content').setAttribute('sidebar-state', 'hidden');
if ($rootScope.isMobileUi()) {
document.getElementById('sidebar').setAttribute('data-state', 'hidden');
document.getElementById('content').setAttribute('sidebar-state', 'hidden');
}
};
$scope.$watch('autoconnect', function() {
if ($scope.autoconnect && !$rootScope.connected) {