Skip to content

Instantly share code, notes, and snippets.

@olivierchatry
Created May 22, 2015 13:39
Show Gist options
  • Select an option

  • Save olivierchatry/04a77b1e9e10f4b7234a to your computer and use it in GitHub Desktop.

Select an option

Save olivierchatry/04a77b1e9e10f4b7234a to your computer and use it in GitHub Desktop.
canPlayOrScrub: false,
canPlayOrScrubObserver: function() {
if (this.get('activities.isFulfilled'))
{
let allGood = this.get('activities').every(
(activity) => {
if (activity.get('action.isSettled'))
return true;
Ember.addObserver(activity, "action.isSettled", this, 'canPlayOrScrubObserver');
return false;
});
this.set("canPlayOrScrub", allGood);
}
}.observes('activities.isFulfilled'),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment