Merge pull request #1003 from JulienPalard/jump-on-unread-messages-even-if-hidden

jump to buffers with notifiction with Alt-A, even if hidden.
This commit is contained in:
Lorenz Hübschle-Schneider 2018-04-23 11:28:35 +02:00 committed by GitHub
commit ca97da8513
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -725,7 +725,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
if (buffer.pinned) { if (buffer.pinned) {
return true; return true;
} }
return (buffer.unread > 0 || buffer.notification > 0) && !buffer.hidden; return (buffer.unread > 0 && !buffer.hidden) || buffer.notification > 0;
} }
return !buffer.hidden; return !buffer.hidden;
}; };
@ -796,7 +796,7 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
// Try to find buffer with notification // Try to find buffer with notification
for (i in sortedBuffers) { for (i in sortedBuffers) {
buffer = sortedBuffers[i]; buffer = sortedBuffers[i];
if (buffer.notification > 0 && !buffer.hidden) { if (buffer.notification > 0) {
$scope.setActiveBuffer(buffer.id); $scope.setActiveBuffer(buffer.id);
return; // return instead of break so that the second for loop isn't executed return; // return instead of break so that the second for loop isn't executed
} }