Skip to content

Commit

Permalink
Remove observer on viewportEntered
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Nov 24, 2017
1 parent 3a6192d commit 5a36a3d
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions addon/components/lt-infinity.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Component from '@ember/component';
import { observer } from '@ember/object';
import { run } from '@ember/runloop';
import layout from '../templates/components/lt-infinity';
import InViewportMixin from 'ember-in-viewport';
Expand Down Expand Up @@ -42,19 +41,6 @@ export default Component.extend(InViewportMixin, {
this._cancelTimers();
},

scheduleScrolledToBottom: observer('rows.[]', 'viewportEntered', function() {
if (this.get('viewportEntered')) {
/*
Continue scheduling onScrolledToBottom until no longer in viewport
*/
this._scheduleScrolledToBottom();
}
}),

_scheduleScrolledToBottom() {
this._schedulerTimer = run.scheduleOnce('afterRender', this, this._debounceScrolledToBottom);
},

_debounceScrolledToBottom(delay = 100) {
/*
This debounce is needed when there is not enough delay between onScrolledToBottom calls.
Expand Down

0 comments on commit 5a36a3d

Please sign in to comment.