From 3593c1cfa5a4c4c5acbcd30be6ec3d5fd4a54c96 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 25 Nov 2021 23:11:53 +0100 Subject: [PATCH 1/5] Improve generated Swift header imports. --- Riot/Model/Room/RoomPreviewData.m | 3 ++- Riot/Modules/Authentication/Views/AuthInputsView.h | 2 +- Riot/Modules/Authentication/Views/AuthInputsView.m | 2 ++ Riot/Modules/Common/Recents/Model/RecentCellData.m | 1 - Riot/Modules/GlobalSearch/Files/CellData/FilesSearchCellData.m | 2 ++ Riot/Modules/Room/CellData/RoomBubbleCellData.m | 1 - 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Riot/Model/Room/RoomPreviewData.m b/Riot/Model/Room/RoomPreviewData.m index 07ece4510..f619344ed 100644 --- a/Riot/Model/Room/RoomPreviewData.m +++ b/Riot/Model/Room/RoomPreviewData.m @@ -16,7 +16,8 @@ */ #import "RoomPreviewData.h" -#import + +#import "GeneratedInterface-Swift.h" @implementation RoomPreviewData diff --git a/Riot/Modules/Authentication/Views/AuthInputsView.h b/Riot/Modules/Authentication/Views/AuthInputsView.h index 684f44f66..79e30d638 100644 --- a/Riot/Modules/Authentication/Views/AuthInputsView.h +++ b/Riot/Modules/Authentication/Views/AuthInputsView.h @@ -17,7 +17,7 @@ #import -#import "GeneratedInterface-Swift.h" +@class TermsView; @interface AuthInputsView : MXKAuthInputsView diff --git a/Riot/Modules/Authentication/Views/AuthInputsView.m b/Riot/Modules/Authentication/Views/AuthInputsView.m index 68a79c202..d3b9c65b4 100644 --- a/Riot/Modules/Authentication/Views/AuthInputsView.m +++ b/Riot/Modules/Authentication/Views/AuthInputsView.m @@ -26,6 +26,8 @@ #import "RiotNavigationController.h" +#import "GeneratedInterface-Swift.h" + @interface AuthInputsView () { /** diff --git a/Riot/Modules/Common/Recents/Model/RecentCellData.m b/Riot/Modules/Common/Recents/Model/RecentCellData.m index 9697b85ea..01800996f 100644 --- a/Riot/Modules/Common/Recents/Model/RecentCellData.m +++ b/Riot/Modules/Common/Recents/Model/RecentCellData.m @@ -18,7 +18,6 @@ #import "RecentCellData.h" #import "MXRoom+Riot.h" -#import "MatrixSDK-Swift.h" #import "GeneratedInterface-Swift.h" diff --git a/Riot/Modules/GlobalSearch/Files/CellData/FilesSearchCellData.m b/Riot/Modules/GlobalSearch/Files/CellData/FilesSearchCellData.m index d7af35024..f9dcf9ea2 100644 --- a/Riot/Modules/GlobalSearch/Files/CellData/FilesSearchCellData.m +++ b/Riot/Modules/GlobalSearch/Files/CellData/FilesSearchCellData.m @@ -18,6 +18,8 @@ #import "FilesSearchCellData.h" +#import "GeneratedInterface-Swift.h" + @implementation FilesSearchCellData @synthesize roomId, senderDisplayName; @synthesize searchResult, title, message, date, shouldShowRoomDisplayName, roomDisplayName, attachment, isAttachmentWithThumbnail, attachmentIcon; diff --git a/Riot/Modules/Room/CellData/RoomBubbleCellData.m b/Riot/Modules/Room/CellData/RoomBubbleCellData.m index 697d67178..f73e211c3 100644 --- a/Riot/Modules/Room/CellData/RoomBubbleCellData.m +++ b/Riot/Modules/Room/CellData/RoomBubbleCellData.m @@ -24,7 +24,6 @@ #import "BubbleReactionsViewSizer.h" #import "GeneratedInterface-Swift.h" -#import static NSAttributedString *timestampVerticalWhitespace = nil; From 15d7dfcf6ac9b56a736297756a06b9cea98cc71f Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Thu, 25 Nov 2021 23:13:00 +0100 Subject: [PATCH 2/5] Update changes --- changelog.d/5194.bugfix | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/5194.bugfix diff --git a/changelog.d/5194.bugfix b/changelog.d/5194.bugfix new file mode 100644 index 000000000..56d98768e --- /dev/null +++ b/changelog.d/5194.bugfix @@ -0,0 +1 @@ +Improve generated Swift header imports. From 5d618824b589a3f37ae1fd29dd3ec57fae548576 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 26 Nov 2021 14:39:00 +0100 Subject: [PATCH 3/5] MasterTabBarController: Don't use MXCrypto private property. --- Riot/Modules/TabBar/MasterTabBarController.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Riot/Modules/TabBar/MasterTabBarController.m b/Riot/Modules/TabBar/MasterTabBarController.m index f1afa5821..4a4751d83 100644 --- a/Riot/Modules/TabBar/MasterTabBarController.m +++ b/Riot/Modules/TabBar/MasterTabBarController.m @@ -1021,7 +1021,7 @@ return; } - NSArray *devices = [session.crypto.store devicesForUser:session.myUserId].allValues; + NSArray *devices = [session.crypto devicesForUser:session.myUserId].allValues; BOOL isUserHasOneUnverifiedDevice = NO; From e15eb26872c4c9c49f232e122a702d919490647a Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 26 Nov 2021 15:25:36 +0100 Subject: [PATCH 4/5] SecurityViewController: Don't use private properties from SDK. --- Riot/Modules/Settings/Security/SecurityViewController.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Riot/Modules/Settings/Security/SecurityViewController.m b/Riot/Modules/Settings/Security/SecurityViewController.m index 9feda8f59..76a80fedc 100644 --- a/Riot/Modules/Settings/Security/SecurityViewController.m +++ b/Riot/Modules/Settings/Security/SecurityViewController.m @@ -169,9 +169,8 @@ TableViewSectionsDelegate> if (self.mainSession.crypto.backup) { - MXDeviceInfo *deviceInfo = [self.mainSession.crypto.deviceList storedDevice:self.mainSession.matrixRestClient.credentials.userId - deviceId:self.mainSession.matrixRestClient.credentials.deviceId]; - + MXDeviceInfo *deviceInfo = [self.mainSession.crypto deviceWithDeviceId:self.mainSession.myDeviceId ofUser:self.mainSession.myUserId]; + if (deviceInfo) { secureBackupSection = [[SettingsSecureBackupTableViewSection alloc] initWithRecoveryService:self.mainSession.crypto.recoveryService keyBackup:self.mainSession.crypto.backup userDevice:deviceInfo]; From 30d6cdc4051e513d1386a4be9b49af85b9c47e40 Mon Sep 17 00:00:00 2001 From: SBiOSoftWhare Date: Fri, 26 Nov 2021 15:26:34 +0100 Subject: [PATCH 5/5] LegacyAppDelegate: Don't use private interface from SDK. --- Riot/Modules/Application/LegacyAppDelegate.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Riot/Modules/Application/LegacyAppDelegate.m b/Riot/Modules/Application/LegacyAppDelegate.m index 75060f84b..0a2aaed0e 100644 --- a/Riot/Modules/Application/LegacyAppDelegate.m +++ b/Riot/Modules/Application/LegacyAppDelegate.m @@ -2500,17 +2500,17 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni - (void)checkLocalPrivateKeysInSession:(MXSession*)mxSession { - id cryptoStore = mxSession.crypto.store; + MXRecoveryService *recoveryService = mxSession.crypto.recoveryService; NSUInteger keysCount = 0; - if ([cryptoStore secretWithSecretId:MXSecretId.keyBackup]) + if ([recoveryService hasSecretWithSecretId:MXSecretId.keyBackup]) { keysCount++; } - if ([cryptoStore secretWithSecretId:MXSecretId.crossSigningUserSigning]) + if ([recoveryService hasSecretWithSecretId:MXSecretId.crossSigningUserSigning]) { keysCount++; } - if ([cryptoStore secretWithSecretId:MXSecretId.crossSigningSelfSigning]) + if ([recoveryService hasSecretWithSecretId:MXSecretId.crossSigningSelfSigning]) { keysCount++; }