switchToActivityBuffer: Prioritise notifications

If there is a buffer with a notification, go there. Otherwise, go to one with unread lines.
This commit is contained in:
Lorenz Hübschle-Schneider 2014-02-17 12:31:23 +00:00
parent 93f40c64e9
commit 1a5b36b6f7

View file

@ -738,7 +738,11 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
if (buffer.notification > 0) { if (buffer.notification > 0) {
$scope.setActiveBuffer(buffer.id); $scope.setActiveBuffer(buffer.id);
break; break;
} else if(buffer.unread > 0) { }
}
for (var i in sortedBuffers) {
var buffer = sortedBuffers[i];
if(buffer.unread > 0) {
$scope.setActiveBuffer(buffer.id); $scope.setActiveBuffer(buffer.id);
break; break;
} }