fix: update DeletePasswordCharacter method to use length before deletion for proper LED feedback.

This commit is contained in:
Jonathan Arndt
2025-05-05 13:19:48 -07:00
parent 93f0f4cbfe
commit 69ea8589cc

View File

@@ -126,8 +126,9 @@ namespace PepperDash.Core.PasswordManagement
/// </summary> /// </summary>
public void DeletePasswordCharacter() public void DeletePasswordCharacter()
{ {
ushort PasswordLengthBeforeDelete = (ushort)PasswordToValidate.Length;
PasswordToValidate = PasswordToValidate.Substring(0, PasswordToValidate.Length - 1); PasswordToValidate = PasswordToValidate.Substring(0, PasswordToValidate.Length - 1);
OnBoolChange(false, (ushort)PasswordToValidate.Length, PasswordManagementConstants.PasswordLedFeedbackChange); OnBoolChange(false, (ushort)PasswordLengthBeforeDelete, PasswordManagementConstants.PasswordLedFeedbackChange);
// Verify if OnStringChange is needed to update the S+ wrapper with the entered PasswordToValidate // Verify if OnStringChange is needed to update the S+ wrapper with the entered PasswordToValidate
} }