Resized tasks, filter completed, add cron for non yesterdailies

This commit is contained in:
Keith Holliday
2017-06-16 09:01:23 -06:00
parent a52bd66871
commit 7a8857010e
3 changed files with 26 additions and 3 deletions

View File

@@ -24,13 +24,16 @@ habitrpg.controller('NotificationCtrl',
var yesterDailies = [];
dailys.forEach(function (task) {
if (task && task.group.approval && task.group.approval.requested) return;
if (task.completed) return;
var shouldDo = Shared.shouldDo(yesterDay, task);
if (task.yesterDaily && shouldDo) yesterDailies.push(task);
});
if (yesterDailies.length === 0) return;
if (yesterDailies.length === 0) {
User.runCron();
return;
};
var modalScope = $rootScope.$new();
modalScope.obj = User.user;