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