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

View file

@ -733,15 +733,16 @@ 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;
}
}
for (var i in sortedBuffers) {
var buffer = sortedBuffers[i];
for (i in sortedBuffers) {
buffer = sortedBuffers[i];
if(buffer.unread > 0) {
$scope.setActiveBuffer(buffer.id);
break;