Skip to content

Commit

Permalink
Fix Flavor Text editor not saving correctly (#28122)
Browse files Browse the repository at this point in the history
* 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.

(cherry picked from commit 9f1d95e3353493f28d579b562de348a322312885)
  • Loading branch information
dffdff2423 authored and Evgencheg committed Sep 29, 2024
1 parent c510d56 commit 7a4a7f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Content.Client/FlavorText/FlavorText.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public 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()
Expand Down
3 changes: 2 additions & 1 deletion Content.Shared/Preferences/HumanoidCharacterProfile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ public bool MemberwiseEquals(ICharacterProfile maybeOther)
&& _antagPreferences.SequenceEqual(other._antagPreferences)
&& _traitPreferences.SequenceEqual(other._traitPreferences)
&& LoadoutPreferences.SequenceEqual(other.LoadoutPreferences)
&& Appearance.MemberwiseEquals(other.Appearance);
&& Appearance.MemberwiseEquals(other.Appearance)
&& FlavorText == other.FlavorText;
}

public void EnsureValid(ICommonSession session, IDependencyCollection collection)
Expand Down

0 comments on commit 7a4a7f1

Please sign in to comment.