From ce1faa50cfc226463903e0cab63c8f3fd96b4ba2 Mon Sep 17 00:00:00 2001 From: Haselnussbomber Date: Sun, 21 Sep 2025 14:00:23 +0200 Subject: [PATCH] Remove AutoTranslatePayload text cache - Lumina lookups aren't that taxing anymore - Cache wasn't invalidated when the language override changes --- .../Text/SeStringHandling/Payloads/AutoTranslatePayload.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs b/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs index 7ca1609fa..470e942c3 100644 --- a/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs +++ b/Dalamud/Game/Text/SeStringHandling/Payloads/AutoTranslatePayload.cs @@ -14,7 +14,6 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads; /// public class AutoTranslatePayload : Payload, ITextProvider { - private string? text; private ReadOnlySeString payload; /// @@ -77,11 +76,11 @@ public class AutoTranslatePayload : Payload, ITextProvider { if (this.Group is 100 or 200) { - return this.text ??= Service.Get().Evaluate(this.payload).ToString(); + return Service.Get().Evaluate(this.payload).ToString(); } - // wrap the text in the colored brackets that is uses in-game, since those are not actually part of any of the payloads - return this.text ??= $"{(char)SeIconChar.AutoTranslateOpen} {Service.Get().Evaluate(this.payload)} {(char)SeIconChar.AutoTranslateClose}"; + // wrap the text in the colored brackets that are used in-game, since those are not actually part of any of the fixed macro payload + return $"{(char)SeIconChar.AutoTranslateOpen} {Service.Get().Evaluate(this.payload)} {(char)SeIconChar.AutoTranslateClose}"; } }