mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Refactor DeviceVerification prefix classes to KeyVerification where needed. And move key verification related classes into the same module KeyVerification.
This commit is contained in:
@@ -20,14 +20,14 @@
|
||||
#import "AppDelegate.h"
|
||||
#import "Riot-Swift.h"
|
||||
|
||||
@interface UsersDevicesViewController () <DeviceVerificationCoordinatorBridgePresenterDelegate>
|
||||
@interface UsersDevicesViewController () <KeyVerificationCoordinatorBridgePresenterDelegate>
|
||||
{
|
||||
MXUsersDevicesMap<MXDeviceInfo*> *usersDevices;
|
||||
MXSession *mxSession;
|
||||
|
||||
void (^onCompleteBlock)(BOOL doneButtonPressed);
|
||||
|
||||
DeviceVerificationCoordinatorBridgePresenter *deviceVerificationCoordinatorBridgePresenter;
|
||||
KeyVerificationCoordinatorBridgePresenter *keyVerificationCoordinatorBridgePresenter;
|
||||
|
||||
// Observe kThemeServiceDidChangeThemeNotification to handle user interface theme change.
|
||||
id kThemeServiceDidChangeThemeNotificationObserver;
|
||||
@@ -216,10 +216,10 @@
|
||||
if (verificationStatus == MXDeviceVerified)
|
||||
{
|
||||
// Prompt the user before marking as verified the device.
|
||||
deviceVerificationCoordinatorBridgePresenter = [[DeviceVerificationCoordinatorBridgePresenter alloc] initWithSession:mxSession];
|
||||
deviceVerificationCoordinatorBridgePresenter.delegate = self;
|
||||
keyVerificationCoordinatorBridgePresenter = [[KeyVerificationCoordinatorBridgePresenter alloc] initWithSession:mxSession];
|
||||
keyVerificationCoordinatorBridgePresenter.delegate = self;
|
||||
|
||||
[deviceVerificationCoordinatorBridgePresenter presentFrom:self otherUserId:deviceTableViewCell.deviceInfo.userId otherDeviceId:deviceTableViewCell.deviceInfo.deviceId animated:YES];
|
||||
[keyVerificationCoordinatorBridgePresenter presentFrom:self otherUserId:deviceTableViewCell.deviceInfo.userId otherDeviceId:deviceTableViewCell.deviceInfo.deviceId animated:YES];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -244,10 +244,10 @@
|
||||
|
||||
#pragma mark - DeviceVerificationCoordinatorBridgePresenterDelegate
|
||||
|
||||
- (void)deviceVerificationCoordinatorBridgePresenterDelegateDidComplete:(DeviceVerificationCoordinatorBridgePresenter *)coordinatorBridgePresenter otherUserId:(NSString * _Nonnull)otherUserId otherDeviceId:(NSString * _Nonnull)otherDeviceId
|
||||
- (void)keyVerificationCoordinatorBridgePresenterDelegateDidComplete:(KeyVerificationCoordinatorBridgePresenter *)coordinatorBridgePresenter otherUserId:(NSString * _Nonnull)otherUserId otherDeviceId:(NSString * _Nonnull)otherDeviceId
|
||||
{
|
||||
[deviceVerificationCoordinatorBridgePresenter dismissWithAnimated:YES completion:nil];
|
||||
deviceVerificationCoordinatorBridgePresenter = nil;
|
||||
[keyVerificationCoordinatorBridgePresenter dismissWithAnimated:YES completion:nil];
|
||||
keyVerificationCoordinatorBridgePresenter = nil;
|
||||
|
||||
// Update our map
|
||||
[mxSession.crypto downloadKeys:@[otherUserId] forceDownload:NO success:^(MXUsersDevicesMap<MXDeviceInfo *> *usersDevicesInfoMap, NSDictionary<NSString *,MXCrossSigningInfo *> *crossSigningKeysMap) {
|
||||
|
||||
Reference in New Issue
Block a user