mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 07:37:25 +01:00
misc cleanup
This commit is contained in:
@@ -17,19 +17,15 @@ habitrpg.controller('NotificationCtrl',
|
||||
|
||||
$rootScope.$watch('user.stats.gp', function(after, before) {
|
||||
if (after == before) return;
|
||||
var bonus, money;
|
||||
var money = after - before;
|
||||
Notification.gp(money);
|
||||
|
||||
//Append Bonus
|
||||
bonus = User.user._tmp.streakBonus;
|
||||
var bonus = User.user._tmp.streakBonus;
|
||||
|
||||
if ((money > 0) && !!bonus) {
|
||||
if (bonus < 0.01) {
|
||||
bonus = 0.01;
|
||||
}
|
||||
if (bonus < 0.01) bonus = 0.01;
|
||||
Notification.text("+ " + Notification.coins(bonus) + " Streak Bonus!");
|
||||
delete User.user._tmp.streakBonus;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user