misc cleanup

This commit is contained in:
Tyler Renelle
2013-09-17 12:52:51 -04:00
parent f26b0a2cf5
commit 1c7081495f

View File

@@ -17,19 +17,15 @@ habitrpg.controller('NotificationCtrl',
$rootScope.$watch('user.stats.gp', function(after, before) { $rootScope.$watch('user.stats.gp', function(after, before) {
if (after == before) return; if (after == before) return;
var bonus, money;
var money = after - before; var money = after - before;
Notification.gp(money); Notification.gp(money);
//Append Bonus //Append Bonus
bonus = User.user._tmp.streakBonus; var bonus = User.user._tmp.streakBonus;
if ((money > 0) && !!bonus) { if ((money > 0) && !!bonus) {
if (bonus < 0.01) { if (bonus < 0.01) bonus = 0.01;
bonus = 0.01;
}
Notification.text("+ " + Notification.coins(bonus) + " Streak Bonus!"); Notification.text("+ " + Notification.coins(bonus) + " Streak Bonus!");
delete User.user._tmp.streakBonus;
} }
}); });