Fix Flavor Text editor not saving correctly (#28122)

* Check for flavor text equality in profile.

* Fix some characters being deleted from flavor text

Sometimes the last few characters of the flavor text would get deleted. This fixes this issue.
This commit is contained in:
dffdff2423
2024-06-01 16:51:06 +02:00
committed by null
parent d000edce59
commit 24bb967ffc
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ namespace Content.Client.FlavorText
var loc = IoCManager.Resolve<ILocalizationManager>();
CFlavorTextInput.Placeholder = new Rope.Leaf(loc.GetString("flavor-text-placeholder"));
CFlavorTextInput.OnKeyBindDown += _ => FlavorTextChanged();
CFlavorTextInput.OnTextChanged += _ => FlavorTextChanged();
}
public void FlavorTextChanged()
@@ -396,6 +396,7 @@ namespace Content.Shared.Preferences
if (!_antagPreferences.SequenceEqual(other._antagPreferences)) return false;
if (!_traitPreferences.SequenceEqual(other._traitPreferences)) return false;
if (!Loadouts.SequenceEqual(other.Loadouts)) return false;
if (FlavorText != other.FlavorText) return false;
return Appearance.MemberwiseEquals(other.Appearance);
}