mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Not tracking posts that dynamically load
This commit is contained in:
parent
a0d61ebf7f
commit
4e209846cb
@ -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 New Issue
Block a user