Skip to content

Commit

Permalink
Correct experimental, preemptive fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mrbuilder1961 committed Jan 20, 2025
1 parent 6ebb107 commit 93dc9b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/obro1961/chatpatches/util/ChatUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ public static MutableText buildMessage(@Nullable Style rootStyle, @Nullable Text
*/
public static Text modifyMessage(@NotNull Text m) {
if(ChatLog.isSuspended()) // cancel modifications when loading the chat log
// restructure the message if it's not already formatted (fixme: should this be here?)
return m.getSiblings().size() != DUPE_INDEX ? buildMessage(m.getStyle(), null, m, null) : m;
// restructure the message if it's not built properly (fixme: should this be here?)
return m.getSiblings().size() != (DUPE_INDEX + 1) ? buildMessage(m.getStyle(), null, m, null) : m;

boolean lastEmpty = msgData.equals(ChatUtils.NIL_MSG_DATA);
Date now = lastEmpty ? new Date() : msgData.timestamp;
Expand Down

0 comments on commit 93dc9b0

Please sign in to comment.