aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/chat/CompactExperimentRewards.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactExperimentRewards.kt b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactExperimentRewards.kt
index 286166ee7..8ad277b4a 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/chat/CompactExperimentRewards.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/chat/CompactExperimentRewards.kt
@@ -21,7 +21,7 @@ object CompactExperimentRewards {
private val config get() = SkyHanniMod.feature.chat
- private var gainedRewards = mutableListOf<String>()
+ private val gainedRewards = mutableListOf<String>()
private var lastTimeTableOpened = SimpleTimeMark.farPast()
private var currentMessage = ""
@@ -89,7 +89,7 @@ object CompactExperimentRewards {
}
private fun sendMessage(reward: String?) {
- if (gainedRewards.last() != reward || currentMessage == "") return
+ if (gainedRewards.lastOrNull() != reward || currentMessage == "") return
val expList = mutableListOf<String>().apply {
gainedRewards.forEach { add("ยง8+$it") }