mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-04-01 09:39:51 -04:00
BUGFIX: notifying on new topics when topic list is not visible
This commit is contained in:
parent
6205240a56
commit
f7bf4b2dc3
2 changed files with 11 additions and 1 deletions
app/assets/javascripts/discourse
|
@ -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…
Add table
Reference in a new issue