Move updating title count to the view, to ensure the topic list is

visible when it happens.
This commit is contained in:
Robin Ward 2014-02-03 10:45:52 -05:00
parent d2974c2a15
commit ea9ff108c5
2 changed files with 4 additions and 4 deletions

View file

@ -53,10 +53,6 @@ Discourse.DiscoveryTopicsController = Discourse.DiscoveryController.extend({
weekly: Em.computed.equal('period', 'weekly'),
daily: Em.computed.equal('period', 'daily'),
updateTitle: function(){
Discourse.notifyTitle(this.get('topicTrackingState.incomingCount'));
}.observes('topicTrackingState.incomingCount'),
footerMessage: function() {
if (!this.get('allLoaded')) { return; }

View file

@ -31,6 +31,10 @@ Discourse.DiscoveryTopicsView = Discourse.View.extend(Discourse.LoadMore, {
}
},
_updateTitle: function() {
Discourse.notifyTitle(this.get('controller.topicTrackingState.incomingCount'));
}.observes('controller.topicTrackingState.incomingCount'),
// Remember where we were scrolled to
saveScrollPosition: function() {
Discourse.Session.current().set('topicListScrollPosition', $(window).scrollTop());