mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 19:50:37 +00:00
misc cleanup
This commit is contained in:
parent
f26b0a2cf5
commit
1c7081495f
1 changed files with 2 additions and 6 deletions
|
|
@ -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;
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue