Cross-signing: Fix a missed API break

This commit is contained in:
manuroe
2020-01-16 11:02:46 +01:00
parent f816d70dc1
commit 3688150113
@@ -227,14 +227,21 @@
forDevice:deviceTableViewCell.deviceInfo.deviceId
ofUser:deviceTableViewCell.deviceInfo.userId
success:^{
//deviceTableViewCell.deviceInfo.verified = verificationStatus;
[self.tableView reloadData];
[self reloadDataforUser:deviceTableViewCell.deviceInfo.userId andDevice:deviceTableViewCell.deviceInfo.deviceId];
} failure:nil];
}
}
- (void)reloadDataforUser:(NSString *)userId andDevice:(NSString *)deviceId
{
// Refresh data
MXDeviceInfo *device = [mxSession.crypto deviceInfoForDevice:deviceId ofUser:userId];
[usersDevices setObject:device forUser:userId andDevice:deviceId];
// and reload
[self.tableView reloadData];
}
#pragma mark - DeviceVerificationCoordinatorBridgePresenterDelegate
- (void)deviceVerificationCoordinatorBridgePresenterDelegateDidComplete:(DeviceVerificationCoordinatorBridgePresenter *)coordinatorBridgePresenter otherUserId:(NSString * _Nonnull)otherUserId otherDeviceId:(NSString * _Nonnull)otherDeviceId
@@ -243,16 +250,9 @@
deviceVerificationCoordinatorBridgePresenter = nil;
// Update our map
MXWeakify(self);
[mxSession.crypto downloadKeys:@[otherUserId] forceDownload:NO success:^(MXUsersDevicesMap<MXDeviceInfo *> *usersDevicesInfoMap, NSDictionary<NSString *,MXCrossSigningInfo *> *crossSigningKeysMap) {
MXStrongifyAndReturnIfNil(self);
MXDeviceInfo *deviceInfo = [usersDevicesInfoMap objectForDevice:otherDeviceId forUser:otherUserId];
MXDeviceInfo *device = [self->usersDevices objectForDevice:otherDeviceId forUser:otherUserId];
//device.verified = deviceInfo.verified;
[self.tableView reloadData];
[self reloadDataforUser:otherUserId andDevice:otherDeviceId];
} failure:^(NSError *error) {
// Should not happen (the device is in the crypto db)