diff options
author | appable <enzospiacitelli@gmail.com> | 2023-08-07 02:09:23 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-07 11:09:23 +0200 |
commit | 77d61f6fa5530f1a8fbb8f28ffac48a77017810b (patch) | |
tree | d24cd0d7cbfefaad438904e5c6ae526ef27b8e31 | |
parent | af192ed7327735f5ac590f65d30a001d68815e06 (diff) | |
download | skyhanni-77d61f6fa5530f1a8fbb8f28ffac48a77017810b.tar.gz skyhanni-77d61f6fa5530f1a8fbb8f28ffac48a77017810b.tar.bz2 skyhanni-77d61f6fa5530f1a8fbb8f28ffac48a77017810b.zip |
Merge pull request #362
* fix "null%" in golden fish info tooltip
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishInfo.kt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishInfo.kt b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishInfo.kt index 8fd402fee..984f9c9dd 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishInfo.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/fishing/trophy/TrophyFishInfo.kt @@ -22,8 +22,9 @@ data class TrophyFishInfo( // Credit to NotEnoughUpdates (Trophy Fish profile viewer page) for the format. fun getTooltip(counts: Map<TrophyRarity, Int>): ChatStyle { val bestFishObtained = counts.keys.maxOrNull() ?: TrophyRarity.BRONZE + val rateString = if (rate != null) "§8[§7$rate%§8]" else "" val display = """ - |$displayName §8[§7$rate%§8] + |$displayName $rateString |${description.splitLines(150)} | |${TrophyRarity.DIAMOND.formattedString}: ${formatCount(counts, TrophyRarity.DIAMOND)} |