Skip to content
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

Fix password update management in Tchap Settings screen #712

Merged
merged 3 commits into from
Jan 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions Riot/Modules/Settings/SettingsViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,6 @@ @interface SettingsViewController () <UITextFieldDelegate, MXKCountryPickerViewC

@property (nonatomic) AnalyticsScreenTracker *screenTracker;

// Tchap: Customize Password change
#ifdef SECURE_BACKUP
@property (nonatomic, strong) ChangePasswordAlertPresenter *changePasswordAlertPresenter;
#endif
@property (strong, nonatomic) ChangePasswordCoordinatorBridgePresenter *changePasswordPresenter;

@property (nonatomic, strong) MXKDocumentPickerPresenter *documentPickerPresenter;
Expand Down Expand Up @@ -4347,14 +4343,8 @@ - (BOOL)textFieldShouldReturn:(UITextField *)textField

- (void)promptUserBeforePasswordChange
{
#ifdef SECURE_BACKUP
MXKeyBackup *keyBackup = self.mainSession.crypto.backup;

[self.changePasswordAlertPresenter presentFor:keyBackup.state
areThereKeysToBackup:keyBackup.hasKeysToBackup
from:self
sourceView:self.tableView
animated:YES];
#ifndef SECURE_BACKUP
[self displayPasswordAlert];
#else
MXWeakify(self);
[resetPwdAlertController dismissViewControllerAnimated:NO completion:nil];
Expand Down Expand Up @@ -4431,6 +4421,16 @@ - (nullable NSString *)detailedMessageOnPasswordUpdateFailure:(NSError *)error
return message;
}

#pragma password update management

- (void)displayPasswordAlert
{
self.changePasswordBridgePresenter = [[ChangePasswordCoordinatorBridgePresenter alloc] initWithSession:self.mainSession];
self.changePasswordBridgePresenter.delegate = self;

[self.changePasswordBridgePresenter presentFrom:self animated:YES];
}

#pragma mark - MXKCountryPickerViewControllerDelegate

- (void)countryPickerViewController:(MXKCountryPickerViewController *)countryPickerViewController didSelectCountry:(NSString *)isoCountryCode
Expand Down

This file was deleted.

1 change: 1 addition & 0 deletions changelog.d/710.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix password update management in Tchap Settings screen