aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralexia <me@alexia.lol>2023-12-11 22:13:41 +0100
committerGitHub <noreply@github.com>2023-12-11 22:13:41 +0100
commit53bac64d16fe7568e1dc24d0e58d4a02e05cf82e (patch)
tree441ec95012e63076e7f4017f47bd6148a6ae8f2f /src
parent9d3603e2efe7b0ce5532170d92dadf23d1ac110e (diff)
downloadskyhanni-53bac64d16fe7568e1dc24d0e58d4a02e05cf82e.tar.gz
skyhanni-53bac64d16fe7568e1dc24d0e58d4a02e05cf82e.tar.bz2
skyhanni-53bac64d16fe7568e1dc24d0e58d4a02e05cf82e.zip
Fix weight leaderboard showing new position as -1 sometimes (#789)
Fixed weight leaderboard showing new position as -1 sometimes. #789
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
index 4b478c28f..3ba3ad59f 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/garden/farming/FarmingWeightDisplay.kt
@@ -385,7 +385,9 @@ class FarmingWeightDisplay {
private fun checkOffScreenLeaderboardChanges() {
val profileSpecific = ProfileStorageData.profileSpecific ?: return
val oldPosition = profileSpecific.garden.farmingWeight.lastFarmingWeightLeaderboard
- if (oldPosition == -1) return
+
+ if (oldPosition <= 0) return
+ if (leaderboardPosition <= 0) return
val diff = leaderboardPosition - oldPosition
if (diff == 0) return