mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Show accurate experience notifications (#10676)
* Show accurate experience notifications Add unit tests for exp notifications * use array to compute exp and lvl values for notification changes * Add tests for user loosing xp cases
This commit is contained in:
committed by
Matteo Pagliazzi
parent
eee5f2f1df
commit
fe39ef72ff
@@ -47,6 +47,5 @@ export function round (number, nDigits) {
|
||||
}
|
||||
|
||||
export function getXPMessage (val) {
|
||||
if (val < -50) return; // don't show when they level up (resetting their exp)
|
||||
return `${getSign(val)} ${round(val)}`;
|
||||
}
|
||||
Reference in New Issue
Block a user