Do not render emotes if they get deactivated at runtime
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Version>1.24.0</Version>
|
||||
<Version>1.24.1</Version>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
+1
-1
@@ -202,7 +202,7 @@ internal class Message
|
||||
AddContentAfterURLCheck(builder.ToString(), text, chunk);
|
||||
builder.Clear();
|
||||
|
||||
AddChunkWithMessage(new TextChunk(chunk.Source, EmotePayload.ResolveEmote(word), word));
|
||||
AddChunkWithMessage(new TextChunk(chunk.Source, EmotePayload.ResolveEmote(word), word) { FallbackColour = text.FallbackColour });
|
||||
builder.Append(' ');
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -1486,7 +1486,7 @@ public sealed class ChatLogWindow : Window
|
||||
|
||||
if (i < chunks.Count - 1)
|
||||
ImGui.SameLine();
|
||||
else if (chunks[i].Link is EmotePayload) {
|
||||
else if (chunks[i].Link is EmotePayload && Plugin.Config.ShowEmotes) {
|
||||
// Emote payloads seem to not automatically put newlines, which
|
||||
// is an issue when modern mode is disabled.
|
||||
ImGui.SameLine();
|
||||
@@ -1521,7 +1521,7 @@ public sealed class ChatLogWindow : Window
|
||||
if (chunk is not TextChunk text)
|
||||
return;
|
||||
|
||||
if (chunk.Link is EmotePayload emotePayload)
|
||||
if (chunk.Link is EmotePayload emotePayload && Plugin.Config.ShowEmotes)
|
||||
{
|
||||
var emoteSize = ImGui.CalcTextSize("W");
|
||||
emoteSize = emoteSize with { Y = emoteSize.X } * 1.5f;
|
||||
|
||||
Reference in New Issue
Block a user