Redirect to first activeBuffer name

with-route-provider
David Cormier 12 years ago
parent 0a74acf170
commit 05df942f81
  1. 10
      js/glowingbear.js
  2. 2
      templates/glowingbear.html

@ -309,7 +309,14 @@ function($rootScope,
// Switch to first buffer on startup
if (i === 0) {
models.setActiveBuffer(buffer.id);
// Set setActiveBuffer emits a signal (activeBufferChanged)
// The $rootScope.$on('activeBuffer...' should take care of
// changing the buffer. However, and for a reason that I ignore
// this signal is not sent on initialization
$rootScope.connected = true;
$location.path(buffer.fullName);
}
}
});
@ -334,9 +341,6 @@ function($rootScope,
weeChat.Protocol.formatSync({})
);
$rootScope.connected = true;
$location.path('/connected');
};
var onmessage = function(event) {

@ -113,7 +113,7 @@
</form>
</li>
<li class="buffer" ng-class="{'active': content.active, 'indent': content.indent }" ng-repeat="(key, content) in buffers | toArray | filter:{fullName:search} | filter:hasUnread | orderBy:predicate">
<a href="#" ng-click="setActiveBuffer(content.id)" title="{{ content.fullName }}">
<a href="#/{{content.fullName}}" 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>
<span class="buffername">{{ content.shortName }}</span><span ng-hide="content.shortName">{{ content.fullName }}</span>

Loading…
Cancel
Save