mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
misc cleanup
This commit is contained in:
@@ -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;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user