mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 19:08:10 -05:00
FIX: Not tracking posts that dynamically load
This commit is contained in:
parent
a0d61ebf7f
commit
4e209846cb
2 changed files with 2 additions and 1 deletions
|
@ -124,6 +124,7 @@ export default MountWidget.extend({
|
|||
this._super();
|
||||
const debouncedScroll = () => Ember.run.debounce(this, this._scrollTriggered, 10);
|
||||
|
||||
this.appEvents.on('post-stream:refresh', debouncedScroll);
|
||||
$(document).bind('touchmove.post-stream', debouncedScroll);
|
||||
$(window).bind('scroll.post-stream', debouncedScroll);
|
||||
this._scrollTriggered();
|
||||
|
@ -152,6 +153,7 @@ export default MountWidget.extend({
|
|||
this.appEvents.off('post-stream:refresh');
|
||||
this.$().off('mouseenter.post-stream');
|
||||
this.$().off('mouseleave.post-stream');
|
||||
this.appEvents.off('post-stream:refresh');
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -7,7 +7,6 @@ const DAY = 1000 * 60 * 60 * 24;
|
|||
export default createWidget('post-stream', {
|
||||
tagName: 'div.post-stream',
|
||||
|
||||
|
||||
html(attrs) {
|
||||
const posts = attrs.posts || [];
|
||||
const postArray = posts.toArray();
|
||||
|
|
Loading…
Reference in a new issue