mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Remove AutoTranslatePayload text cache
- Lumina lookups aren't that taxing anymore - Cache wasn't invalidated when the language override changes
This commit is contained in:
parent
374f9fcbd0
commit
ce1faa50cf
1 changed files with 3 additions and 4 deletions
|
|
@ -14,7 +14,6 @@ namespace Dalamud.Game.Text.SeStringHandling.Payloads;
|
|||
/// </summary>
|
||||
public class AutoTranslatePayload : Payload, ITextProvider
|
||||
{
|
||||
private string? text;
|
||||
private ReadOnlySeString payload;
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -77,11 +76,11 @@ public class AutoTranslatePayload : Payload, ITextProvider
|
|||
{
|
||||
if (this.Group is 100 or 200)
|
||||
{
|
||||
return this.text ??= Service<SeStringEvaluator>.Get().Evaluate(this.payload).ToString();
|
||||
return Service<SeStringEvaluator>.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<SeStringEvaluator>.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<SeStringEvaluator>.Get().Evaluate(this.payload)} {(char)SeIconChar.AutoTranslateClose}";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue