From bd12487fd76819cb4204d831f035a12af1252dd6 Mon Sep 17 00:00:00 2001 From: ismailgulek Date: Fri, 28 Jan 2022 04:32:06 +0300 Subject: [PATCH] Feed threading option in the SDK --- Config/CommonConfiguration.swift | 3 +++ Riot/Modules/Settings/SettingsViewController.m | 1 + 2 files changed, 4 insertions(+) diff --git a/Config/CommonConfiguration.swift b/Config/CommonConfiguration.swift index 5edcacc37..d992bdf27 100644 --- a/Config/CommonConfiguration.swift +++ b/Config/CommonConfiguration.swift @@ -74,6 +74,9 @@ class CommonConfiguration: NSObject, Configurable { // Disable key backup on common sdkOptions.enableKeyBackupWhenStartingMXCrypto = false + + // Pass threading option to the SDK + sdkOptions.enableThreads = RiotSettings.shared.enableThreads sdkOptions.clientPermalinkBaseUrl = BuildSettings.clientPermalinkBaseUrl // Configure key provider delegate diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index be9326fdb..4adfd5a27 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -3210,6 +3210,7 @@ TableViewSectionsDelegate> - (void)toggleEnableThreads:(UISwitch *)sender { RiotSettings.shared.enableThreads = sender.isOn; + MXSDKOptions.sharedInstance.enableThreads = sender.isOn; [[MXKRoomDataSourceManager sharedManagerForMatrixSession:self.mainSession] reset]; [[AppDelegate theDelegate] restoreEmptyDetailsViewController]; }