diff --git a/css/glowingbear.css b/css/glowingbear.css
index 9b9e16c..e5faf52 100644
--- a/css/glowingbear.css
+++ b/css/glowingbear.css
@@ -835,6 +835,10 @@ img.emojione {
bottom: 0px;
}
+ .content[sidebar-state=visible] #nicklist {
+ display: none;
+ }
+
.navbar-fixed-bottom {
margin: 0;
}
diff --git a/index.html b/index.html
index e8063ce..896e178 100644
--- a/index.html
+++ b/index.html
@@ -310,14 +310,14 @@ npm run build-electron-{windows, darwin, linux}
+
-
diff --git a/js/glowingbear.js b/js/glowingbear.js
index 227f32d..32b4193 100644
--- a/js/glowingbear.js
+++ b/js/glowingbear.js
@@ -356,7 +356,9 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
} else if ($scope.swipeStatus === 0) {
// show nicklist
$scope.swipeStatus = -1;
- $scope.updateShowNicklist();
+ if (!$scope.updateShowNicklist()) {
+ $scope.swipeStatus = 0;
+ }
} else if ($scope.swipeStatus === -1) {
/* do nothing */
} else {
@@ -761,26 +763,29 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$scope.updateShowNicklist();
});
$scope.showNicklist = false;
- // Utility function that template can use to check if nicklist should
- // be displayed for current buffer or not
- // is called on buffer switch and certain swipe actions
+ // Utility function that template can use to check if nicklist should be
+ // displayed for current buffer or not is called on buffer switch and
+ // certain swipe actions. Sets $scope.showNicklist accordingly and returns
+ // whether the buffer even has a nicklist to show.
$scope.updateShowNicklist = function() {
- $scope.showNicklist = (function() {
- var ab = models.getActiveBuffer();
- // Check whether buffer exists and nicklist is non-empty
- if (!ab || ab.isNicklistEmpty()) {
- return false;
- }
- // Check if nicklist is disabled in settings (ignored on mobile)
- if (!utils.isMobileUi() && settings.nonicklist) {
- return false;
- }
- // mobile: hide nicklist unless overriden by setting or swipe action
- if (utils.isMobileUi() && !settings.alwaysnicklist && $scope.swipeStatus !== -1) {
- return false;
- }
+ var ab = models.getActiveBuffer();
+ // Check whether buffer exists and nicklist is non-empty
+ if (!ab || ab.isNicklistEmpty()) {
+ $scope.showNicklist = false;
+ return false;
+ }
+ // Check if nicklist is disabled in settings (ignored on mobile)
+ if (!utils.isMobileUi() && settings.nonicklist) {
+ $scope.showNicklist = false;
return true;
- })();
+ }
+ // mobile: hide nicklist unless overriden by setting or swipe action
+ if (utils.isMobileUi() && !settings.alwaysnicklist && $scope.swipeStatus !== -1) {
+ $scope.showNicklist = false;
+ return true;
+ }
+ $scope.showNicklist = true;
+ return true;
};
//XXX not sure whether this belongs here