diff --git a/index.html b/index.html index 2fd8bcd..ea97999 100644 --- a/index.html +++ b/index.html @@ -437,6 +437,16 @@ npm run build-electron-{windows, darwin, linux} +
  • +
    +
    + +
    +
    +
  • diff --git a/js/glowingbear.js b/js/glowingbear.js index b7feb6a..33ecc5d 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -42,6 +42,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', 'savepassword': false, 'autoconnect': false, 'nonicklist': utils.isMobileUi(), + 'alwaysnicklist': false, // only significant on mobile 'noembed': true, 'onlyUnread': false, 'hotlistsync': true, @@ -173,7 +174,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', // Check if we should show nicklist or not $scope.showNicklist = $scope.updateShowNicklist(); } - if ($scope.swipeStatus <= 0) { + if ($scope.swipeStatus <= 0 && !settings.alwaysnicklist) { $scope.swipeStatus = $scope.showNicklist ? -1 : 0; } @@ -336,10 +337,10 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', // Depending on swipe state if ($scope.swipeStatus === 1) { /* do nothing */ - } else if ($scope.swipeStatus === 0 && touch) { - $scope.showSidebar(); + } else if ($scope.swipeStatus === 0) { + if (touch) $scope.showSidebar(); } else if ($scope.swipeStatus === -1) { - $scope.closeNick(); + if (!settings.alwaysnicklist) $scope.closeNick(); } else { console.log("Weird swipe status:", $scope.swipeStatus); $scope.swipeStatus = 0; // restore sanity @@ -351,8 +352,8 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', $rootScope.swipeLeft = function($event) { var touch = $event instanceof TouchEvent; // Depending on swipe state, ... - if ($scope.swipeStatus === 1 && touch) { - $scope.hideSidebar(); + if ($scope.swipeStatus === 1) { + if (touch) $scope.hideSidebar(); } else if ($scope.swipeStatus === 0) { $scope.openNick(); } else if ($scope.swipeStatus === -1) { @@ -769,7 +770,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', // Watch model and update show setting when it changes settings.addCallback('nonicklist', function() { $scope.showNicklist = $scope.updateShowNicklist(); - if ($scope.swipeStatus <= 0) { + if ($scope.swipeStatus <= 0 && !settings.alwaysnicklist) { $scope.swipeStatus = $scope.showNicklist ? -1 : 0; } // restore bottom view @@ -789,7 +790,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', return false; } // Check if option no nicklist is set - if (settings.nonicklist) { + if (settings.nonicklist && !settings.alwaysnicklist) { return false; } // Check if nicklist is empty