mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 04:43:55 +08:00
BUGFIX: notifying on new topics when topic list is not visible
This commit is contained in:
parent
6205240a56
commit
f7bf4b2dc3
@ -54,7 +54,9 @@ Discourse.DiscoveryTopicsController = Discourse.DiscoveryController.extend({
|
||||
daily: Em.computed.equal('period', 'daily'),
|
||||
|
||||
updateTitle: function(){
|
||||
Discourse.notifyTitle(this.get('topicTrackingState.incomingCount'));
|
||||
if(this.get('enableTitleUpdate')) {
|
||||
Discourse.notifyTitle(this.get('topicTrackingState.incomingCount'));
|
||||
}
|
||||
}.observes('topicTrackingState.incomingCount'),
|
||||
|
||||
footerMessage: function() {
|
||||
|
@ -31,6 +31,14 @@ Discourse.DiscoveryTopicsView = Discourse.View.extend(Discourse.LoadMore, {
|
||||
}
|
||||
},
|
||||
|
||||
didInsertElement: function() {
|
||||
this.set('controller.enableTitleUpdate', true);
|
||||
},
|
||||
|
||||
willDestroyElement: function() {
|
||||
this.set('controller.enableTitleUpdate', false);
|
||||
},
|
||||
|
||||
// Remember where we were scrolled to
|
||||
saveScrollPosition: function() {
|
||||
Discourse.Session.current().set('topicListScrollPosition', $(window).scrollTop());
|
||||
|
Loading…
x
Reference in New Issue
Block a user