Skip to content

Commit

Permalink
fix emotes on replies
Browse files Browse the repository at this point in the history
  • Loading branch information
crackededed committed Nov 27, 2024
1 parent 4f7c112 commit dc8d9a2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ android {
minSdk = 21
targetSdk = 35
versionCode = 121
versionName = "2.39.1"
versionName = "2.39.2"
}

buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,12 @@ object ChatUtils {
}
}
}
val replyId = prefixes["reply-thread-parent-msg-id"]
ChatMessage(
id = prefixes["id"],
userId = prefixes["user-id"],
userLogin = userLogin,
userName = prefixes["display-name"]?.replace("\\s", " "),
message = if (replyId != null && userMessage.startsWith("@")) {
userMessage.substringAfter(" ")
} else {
userMessage
},
message = userMessage,
color = prefixes["color"],
emotes = emotesList,
badges = badgesList,
Expand All @@ -88,7 +83,7 @@ object ChatUtils {
systemMsg = systemMsg,
msgId = prefixes["msg-id"],
reward = prefixes["custom-reward-id"]?.let { ChannelPointReward(id = it) },
reply = replyId?.let { Reply(
reply = prefixes["reply-thread-parent-msg-id"]?.let { Reply(
threadParentId = it,
userLogin = prefixes["reply-parent-user-login"],
userName = prefixes["reply-parent-display-name"]?.replace("\\s", " "),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,12 @@ object RecentMessageUtils {
}
}
}
val replyId = prefixes["reply-thread-parent-msg-id"]
ChatMessage(
id = prefixes["id"],
userId = prefixes["user-id"],
userLogin = userLogin,
userName = prefixes["display-name"]?.replace("\\s", " "),
message = if (replyId != null && userMessage.startsWith("@")) {
userMessage.substringAfter(" ")
} else {
userMessage
},
message = userMessage,
color = prefixes["color"],
emotes = emotesList,
badges = badgesList,
Expand All @@ -85,7 +80,7 @@ object RecentMessageUtils {
systemMsg = systemMsg,
msgId = prefixes["msg-id"],
reward = prefixes["custom-reward-id"]?.let { ChannelPointReward(id = it) },
reply = replyId?.let { Reply(
reply = prefixes["reply-thread-parent-msg-id"]?.let { Reply(
threadParentId = it,
userLogin = prefixes["reply-parent-user-login"],
userName = prefixes["reply-parent-display-name"]?.replace("\\s", " "),
Expand Down

0 comments on commit dc8d9a2

Please sign in to comment.