Fix live message ordering during chat log restoration - #339
Conversation
|
omg this is so so awesome! i've been meaning to do this but life is so busy and i really appreciate you contributing to the mod!! there are a couple of things i have questions about so i will ask those per-line so context is available - but THANK YOU! this is awesome. |
|
most of these are nitpicks but look over the few important ones, and once you fix those i should be good to merge! again thank you so so much for your contribution and i hope to see you around the community! apologies for any nonsensical comments; it's late rn 😵 |
|
thanks for the quick fixes, i really appreciate your cooperation! |
|
yes, tested on all versions, everything should be working 👍 |
Fixes #263.
Live chat messages can arrive while the saved chat log is still being deserialized.
Those messages were displayed and persisted immediately, then pushed behind the saved history when restoration finished.
This change queues live messages until restoration completes, ensuring the saved history remains the base and new messages appear afterward in their original arrival order.
LOADINGbefore asynchronous deserialization starts.ChatComponent.addMessagepath so formatting, duplicate condensation, and persistence still run normally.Also switched
TextColor.formatValue()to its public equivalent,TextColor.serialize(), fixing compilation on 26.x without changing formatting behavior.