Skip to content

Instantly share code, notes, and snippets.

@travis
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save travis/9798733 to your computer and use it in GitHub Desktop.
Save travis/9798733 to your computer and use it in GitHub Desktop.
function watchableProjects (user, callbacks) {
var diff, accessibleProjects, watchedProjects;
createAccessibleProjectsQuery(function(accessibleProjectsQuery) {
findAccessibleProjects(function(ap){
accessibleProjects = ap;
diff();
});
});
findWatchedProjects(function(wp){
watchedProjects = wp;
diff();
});
// agh no god please no why
diff = function() {
if (accessibleProjects && watchedProjects) {
callbacks.success(setDifference(accessibleProjects, watchedProjects));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment