|
|
@ -332,13 +332,12 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', |
|
|
|
return document.getElementById('content').getAttribute('sidebar-state') === 'visible'; |
|
|
|
return document.getElementById('content').getAttribute('sidebar-state') === 'visible'; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
$scope.swipeRight = function($event) { |
|
|
|
$scope.swipeRight = function() { |
|
|
|
var touch = $event instanceof TouchEvent; |
|
|
|
|
|
|
|
// Depending on swipe state
|
|
|
|
// Depending on swipe state
|
|
|
|
if ($scope.swipeStatus === 1) { |
|
|
|
if ($scope.swipeStatus === 1) { |
|
|
|
/* do nothing */ |
|
|
|
/* do nothing */ |
|
|
|
} else if ($scope.swipeStatus === 0) { |
|
|
|
} else if ($scope.swipeStatus === 0) { |
|
|
|
if (touch) $scope.showSidebar(); |
|
|
|
$scope.showSidebar(); |
|
|
|
} else if ($scope.swipeStatus === -1) { |
|
|
|
} else if ($scope.swipeStatus === -1) { |
|
|
|
if (!settings.alwaysnicklist) $scope.closeNick(); |
|
|
|
if (!settings.alwaysnicklist) $scope.closeNick(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -349,11 +348,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', |
|
|
|
} |
|
|
|
} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
$rootScope.swipeLeft = function($event) { |
|
|
|
$rootScope.swipeLeft = function() { |
|
|
|
var touch = $event instanceof TouchEvent; |
|
|
|
|
|
|
|
// Depending on swipe state, ...
|
|
|
|
// Depending on swipe state, ...
|
|
|
|
if ($scope.swipeStatus === 1) { |
|
|
|
if ($scope.swipeStatus === 1) { |
|
|
|
if (touch) $scope.hideSidebar(); |
|
|
|
$scope.hideSidebar(); |
|
|
|
} else if ($scope.swipeStatus === 0) { |
|
|
|
} else if ($scope.swipeStatus === 0) { |
|
|
|
$scope.openNick(); |
|
|
|
$scope.openNick(); |
|
|
|
} else if ($scope.swipeStatus === -1) { |
|
|
|
} else if ($scope.swipeStatus === -1) { |
|
|
|