Merge pull request #150 from lorenzhs/patch-2
switchToActivityBuffer: Prioritise notifications
This commit is contained in:
commit
6f972261da
|
@ -733,12 +733,17 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
|
|||
$rootScope.switchToActivityBuffer = function() {
|
||||
// Find next buffer with activity and switch to it
|
||||
var sortedBuffers = _.sortBy($scope.buffers, 'number');
|
||||
for (var i in sortedBuffers) {
|
||||
var buffer = sortedBuffers[i];
|
||||
var i, buffer;
|
||||
for (i in sortedBuffers) {
|
||||
buffer = sortedBuffers[i];
|
||||
if (buffer.notification > 0) {
|
||||
$scope.setActiveBuffer(buffer.id);
|
||||
break;
|
||||
} else if(buffer.unread > 0) {
|
||||
}
|
||||
}
|
||||
for (i in sortedBuffers) {
|
||||
buffer = sortedBuffers[i];
|
||||
if(buffer.unread > 0) {
|
||||
$scope.setActiveBuffer(buffer.id);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue