aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCalMWolfs <cwolfson58@gmail.com>2023-06-20 09:21:58 +1000
committerCalMWolfs <cwolfson58@gmail.com>2023-06-20 09:21:58 +1000
commit917170b1ca53b0718f59a0f922e028567e61c998 (patch)
tree85498ce2928b284bfabd188747483e0dcf950ce8 /src
parentbe16cc2145df374226bf0e83335ee500a7080f4d (diff)
downloadskyhanni-917170b1ca53b0718f59a0f922e028567e61c998.tar.gz
skyhanni-917170b1ca53b0718f59a0f922e028567e61c998.tar.bz2
skyhanni-917170b1ca53b0718f59a0f922e028567e61c998.zip
maybe fixed error
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt
index ea9583057..264d16ae4 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/misc/FrozenTreasureTracker.kt
@@ -42,6 +42,7 @@ class FrozenTreasureTracker {
private fun calculateIcePerHour() {
val difference = estimatedIce - lastEstimatedIce
+ lastEstimatedIce = estimatedIce
if (difference == 0L) {
missedMinutes += 1
if (missedMinutes == 3) {
@@ -53,7 +54,7 @@ class FrozenTreasureTracker {
}
missedMinutes = 0
icePerMin.add(difference)
- icePerHour = icePerMin.average().toInt()
+ if (difference != estimatedIce) icePerHour = icePerMin.average().toInt()
}
private fun formatDisplay(map: List<List<Any>>): List<List<Any>> {