From be9ca7c70320692d2c29e0d57102799929d9d0c8 Mon Sep 17 00:00:00 2001 From: lawvs <18554747+lawvs@users.noreply.github.com> Date: Thu, 14 Nov 2024 16:17:45 +0800 Subject: [PATCH] fix: adjust boost progress calculation for accuracy --- apps/renderer/src/modules/boost/boost-progress.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/renderer/src/modules/boost/boost-progress.tsx b/apps/renderer/src/modules/boost/boost-progress.tsx index 4690e8a814..82b4bec934 100644 --- a/apps/renderer/src/modules/boost/boost-progress.tsx +++ b/apps/renderer/src/modules/boost/boost-progress.tsx @@ -20,8 +20,8 @@ export const BoostProgress = ({ const [numberFormater] = useState(() => new Intl.NumberFormat()) const t = useI18n() const rawPercentage = (boostCount / (boostCount + remainingBoostsToLevelUp)) * 100 - const percentage = 2 + (rawPercentage * (98 - 1)) / 100 - const nextLevel = level + 2 + const percentage = Math.max(rawPercentage, 2) + const nextLevel = level + 1 return (