diff --git a/js/glowingbear.js b/js/glowingbear.js index 506e7c3..fb928fc 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -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) { diff --git a/templates/glowingbear.html b/templates/glowingbear.html index 16ffed1..5105b34 100644 --- a/templates/glowingbear.html +++ b/templates/glowingbear.html @@ -113,7 +113,7 @@
  • - + {{ content.shortName }}{{ content.fullName }}