Fix ordering of channels

As channels aren't added right away (but as soon as the info was
received from the server), somehow the orderBy didn't do its job.
with-route-provider
Lorenz H-S 12 years ago
parent c03dc77e49
commit c4d29a7eb0
  1. 4
      index.html
  2. 1
      js/websockets.js

@ -224,7 +224,7 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel
<input class="form-control monospace" type="text" id="bufferFilter" ng-model="search" ng-keydown="handleSearchBoxKey($event)" placeholder="Search">
</form>
</li>
<li class="buffer" ng-class="{'active': content.active }" ng-repeat="(key, content) in buffers | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:'content.number':true">
<li class="buffer" ng-class="{'active': content.active }" ng-repeat="(key, content) in buffers | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:predicate">
<a href="#" ng-click="setActiveBuffer(content.id)" title="{{ content.fullName }}">
<span class="badge pull-right" ng-hide="content.notification" ng-if="content.unread" ng-bind="content.unread"></span>
<span class="badge pull-right danger" ng-show="content.notification" ng-bind="content.notification"></span>
@ -236,7 +236,7 @@ $ openssl req -nodes -newkey rsa:2048 -keyout relay.pem -x509 -days 365 -out rel
<div id="bufferlines" class="monospace" ng-class="{'withnicklist': showNicklist}">
<div id="nicklist" ng-show="showNicklist" class="vertical-line-left">
<ul class="nicklistgroup list-unstyled" ng-repeat="group in activeBuffer().nicklist">
<li class="" ng-repeat="nick in group.nicks|orderBy:'nick.name'">
<li class="" ng-repeat="nick in group.nicks|orderBy:name">
<a ng-click="nickAction(nick)"><span ng-class="nick.prefixClasses">{{nick.prefix}}</span><span ng-class="nick.nameClasses">{{nick.name}}</span></a>
</li>
</ul>

@ -315,6 +315,7 @@ weechat.factory('connection', ['$q', '$rootScope', '$log', '$store', 'handlers',
models.setActiveBuffer(buffer.id);
}
}
$rootScope.predicate = 'number';
});

Loading…
Cancel
Save