Reduce number of watchers for buffer list

One watcher for each buffer
One additional watcher for each buffer without activity
This commit is contained in:
Lorenz Hübschle-Schneider 2014-05-09 16:46:46 +01:00
parent 78056fd994
commit afc3aa169f

View file

@ -218,9 +218,8 @@ $ openssl req -nodes -newkey rsa:4096 -keyout relay.pem -x509 -days 365 -out rel
</li> </li>
<li class="buffer" ng-class="{'active': buffer.active, 'indent': buffer.indent }" ng-repeat="(key, buffer) in (filteredBuffers = (buffers | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:predicate))"> <li class="buffer" ng-class="{'active': buffer.active, 'indent': buffer.indent }" ng-repeat="(key, buffer) in (filteredBuffers = (buffers | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:predicate))">
<a href="#" ng-click="setActiveBuffer(buffer.id)" title="{{ buffer.fullName }}"> <a href="#" ng-click="setActiveBuffer(buffer.id)" title="{{ buffer.fullName }}">
<span class="badge pull-right" ng-if="buffer.unread && !buffer.notification" ng-bind="buffer.unread"></span> <span class="badge pull-right" ng-class="{'danger': buffer.notification}" ng-if="buffer.notification || buffer.unread" ng-bind="buffer.notification || buffer.unread"></span>
<span class="badge pull-right danger" ng-if="buffer.notification" ng-bind="buffer.notification"></span> <span class="buffername">{{ buffer.shortName || buffer.fullName }}</span>
<span class="buffername">{{ buffer.shortName }}</span><span ng-if="!buffer.shortName">{{ buffer.fullName }}</span>
</a> </a>
</li> </li>
</ul> </ul>