aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-10-06 22:48:31 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2024-10-06 22:48:31 +0200
commit497d652aa83ed81e04f9400ae84362642585dfca (patch)
treed2264864ed3eee9d9ed48a71ea2a26dbdd1db69f /src/main/java/at/hannibal2/skyhanni/data
parent023b44c71ea7739716ebd010cea2841e5336a69b (diff)
downloadskyhanni-497d652aa83ed81e04f9400ae84362642585dfca.tar.gz
skyhanni-497d652aa83ed81e04f9400ae84362642585dfca.tar.bz2
skyhanni-497d652aa83ed81e04f9400ae84362642585dfca.zip
code cleanup in the chat error repo logic
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/jsonobjects/repo/RepoErrorData.kt18
1 files changed, 13 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 486617651..3ec529db3 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
@@ -1,10 +1,18 @@
package at.hannibal2.skyhanni.data.jsonobjects.repo
import com.google.gson.annotations.Expose
+import com.google.gson.annotations.SerializedName
-data class RepoErrorData(
- @Expose var messageExact: List<String>?,
- @Expose var messageStartsWith: List<String>?,
- @Expose var replaceMessage: String?,
- @Expose var affectedVersions: List<String> = listOf(),
+data class RepoErrorJson(
+ @Expose @SerializedName("changed_error_messages") val changedErrorMessages: List<RepoErrorData>,
)
+
+data class RepoErrorData(
+ @Expose @SerializedName("message_exact") private var rawMessageExact: List<String>?,
+ @Expose @SerializedName("message_starts_with") private var rawMessageStartsWith: List<String>?,
+ @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() }
+}