Made quest invite modal pop-up on user sync (rewards display currently nonfunctional)

This commit is contained in:
hairlessbear
2015-05-26 23:01:29 -04:00
parent fce9d39f19
commit 0fa93506f5
4 changed files with 13 additions and 4 deletions

View File

@@ -148,8 +148,9 @@ habitrpg.controller('NotificationCtrl',
});
// Quest invitation modal
$rootScope.$watch('party.quest.key && !party.quest.active && party.quest.members[user._id] == undefined', function(after, before){
if (after == before || after != true) return;
$rootScope.$watch('user.party.quest.invited == true', function(after, before){
if (after != true) return;
$rootScope.party.$get();
$rootScope.openModal('questInvitation');
});