Skip to content

Commit

Permalink
Add null checks in password_hybrid.changed.connect signal
Browse files Browse the repository at this point in the history
  • Loading branch information
eerielili authored and Psayker committed Apr 24, 2024
1 parent e6b8ff3 commit 7555c8e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main/src/ui/manage_accounts/dialog.vala
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ public class Dialog : Gtk.Dialog {
});
image_button.clicked.connect(show_select_avatar);
alias_hybrid.entry.changed.connect(() => { selected_account.alias = alias_hybrid.text; });
password_hybrid.entry.changed.connect(() => { selected_account.password = password_hybrid.text; });
password_change_btn.clicked.connect(show_change_psswd_dialog);
password_hybrid.entry.changed.connect(() => {
string? pw_buffer;
pw_buffer = password_hybrid.text;
if (pw_buffer != null && pw_buffer.length > 0 && pw_buffer != "************") {
selected_account.password = pw_buffer;
}
});

Util.LabelHybridGroup label_hybrid_group = new Util.LabelHybridGroup();
label_hybrid_group.add(alias_hybrid);
Expand Down

0 comments on commit 7555c8e

Please sign in to comment.