add streak achievement notification

This commit is contained in:
Matteo Pagliazzi
2013-10-23 17:57:02 +02:00
parent f56b76b5ae
commit 20f2d75bbf
3 changed files with 9 additions and 3 deletions

View File

@@ -32,6 +32,11 @@ habitrpg.controller('NotificationCtrl',
$rootScope.modals.drop = true;
});
$rootScope.$watch('user.achievements.streak', function(after, before){
if(after == before || after < before) return;
$rootScope.modals.achievements.streak = true;
});
// FIXME: this isn't working for some reason
/*_.each(['weapon', 'head', 'chest', 'shield'], function(watched){
$rootScope.$watch('user.items.' + watched, function(before, after){