switchToActivityBuffer: Prioritise notifications

If there is a buffer with a notification, go there. Otherwise, go to one with unread lines.
with-route-provider
Lorenz Hübschle-Schneider 12 years ago
parent 93f40c64e9
commit 1a5b36b6f7
  1. 6
      js/glowingbear.js

@ -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;
} }

Loading…
Cancel
Save