Fix JS coding style

TODO: rebase this as a fixup. I don't think the github web interface supports that.
This commit is contained in:
Lorenz Hübschle-Schneider 2014-02-17 12:37:14 +00:00
parent 1a5b36b6f7
commit c1760e5433
1 changed files with 5 additions and 4 deletions

View File

@ -733,15 +733,16 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout',
$rootScope.switchToActivityBuffer = function() { $rootScope.switchToActivityBuffer = function() {
// Find next buffer with activity and switch to it // Find next buffer with activity and switch to it
var sortedBuffers = _.sortBy($scope.buffers, 'number'); var sortedBuffers = _.sortBy($scope.buffers, 'number');
for (var i in sortedBuffers) { var i, buffer;
var buffer = sortedBuffers[i]; for (i in sortedBuffers) {
buffer = sortedBuffers[i];
if (buffer.notification > 0) { if (buffer.notification > 0) {
$scope.setActiveBuffer(buffer.id); $scope.setActiveBuffer(buffer.id);
break; break;
} }
} }
for (var i in sortedBuffers) { for (i in sortedBuffers) {
var buffer = sortedBuffers[i]; buffer = sortedBuffers[i];
if(buffer.unread > 0) { if(buffer.unread > 0) {
$scope.setActiveBuffer(buffer.id); $scope.setActiveBuffer(buffer.id);
break; break;