diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-10-06 23:33:32 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2024-10-06 23:33:32 +0200 |
commit | c4077a9aa597ddec23f8d4649c07f6615d0ecfc2 (patch) | |
tree | 6c5ba555a314f95a37af0cc59f9fe9a8968bfe4e /src/main/java/at/hannibal2 | |
parent | ff119419cce3e192012aee9e438911ffeb8d8519 (diff) | |
download | skyhanni-c4077a9aa597ddec23f8d4649c07f6615d0ecfc2.tar.gz skyhanni-c4077a9aa597ddec23f8d4649c07f6615d0ecfc2.tar.bz2 skyhanni-c4077a9aa597ddec23f8d4649c07f6615d0ecfc2.zip |
fixed serialized names not liking lazy
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/RepoErrorData.kt | 4 | ||||
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/RepoErrorData.kt b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/RepoErrorData.kt index 3ec529db3..0fe893723 100644 --- a/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/RepoErrorData.kt +++ b/src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/RepoErrorData.kt @@ -13,6 +13,6 @@ data class RepoErrorData( @Expose @SerializedName("replace_message") var replaceMessage: String?, @Expose @SerializedName("affected_versions") var affectedVersions: List<String> = listOf(), ) { - val messageExact by lazy { rawMessageExact ?: emptyList() } - val messageStartsWith by lazy { rawMessageStartsWith ?: emptyList() } + val messageExact get() = rawMessageExact ?: emptyList() + val messageStartsWith get() = rawMessageStartsWith ?: emptyList() } diff --git a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt index 7fed3ad02..fecdb6cdd 100644 --- a/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt +++ b/src/main/java/at/hannibal2/skyhanni/test/command/ErrorManager.kt @@ -171,9 +171,6 @@ object ErrorManager { private fun buildFinalMessage(message: String): String? { var finalMessage = message - if (finalMessage.last() !in ".?!") { - finalMessage += "§c." - } val rawMessage = message.removeColor() var hideError = false @@ -197,6 +194,9 @@ object ErrorManager { } } + if (finalMessage.last() !in ".?!") { + finalMessage += "§c." + } return if (hideError) null else finalMessage } |