-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change password #1560
base: master
Are you sure you want to change the base?
Change password #1560
Conversation
If UI changes, do attach pics |
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your PR!
Instead of using a Grid-Layout with Labels and Entries, I'd suggest to use Adw.PasswordEntryRow (within an Adw.PreferenceGroup, whithin an Adw.PreferencePage). It gives us some password field features for free and would look like this (this is from the gnome settings password change dialog):
Please remove updates to the .po and .pot files, they make PRs harder to review. We'll update the files independently afterwards.
We try to get rid of references to the StreamInteractor from our UI code, and I'd prefer to not introduce any more in the meanwhile. Could you please create a PasswordChangeDialogModel, that has a function to change the password (basically doing the StreamInteraction calls there instead of in the UI code)? The dialog UI code should contain a reference to the model and call the respective function there.
As a general style remark, you abbreviate variable names in various places (passwd, pw, chpw, btn, s, a, ...). We typically don't do that in our codebase and I'd like to keep the variable naming style at least somewhat consistent.
Iq.Stanza chpw_result = yield stream.get_module(Iq.Module.IDENTITY).send_iq_async(stream, set_password_iq); | ||
if (chpw_result.is_error()) { | ||
ErrorStanza? error_stanza = chpw_result.get_error(); | ||
return error_stanza.text ?? "Error"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest to return the error condition instead. Unlike the text it has to exist and it allows us to display a localized error message of our choosing, also meaning it won't change depending on which server implementation the user uses.
[GtkChild] private unowned Entry confirm_new_passwd_entry; | ||
[GtkChild] private unowned Label change_password_error_label; | ||
|
||
private bool are_forms_empty; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is set but never read.
Can you point me example of model in current code? That is not clean for me where I should create the model's class. |
Fix issue #261
Fix problem with create XEP-0077. Implement more user frendly UI for change password