diff --git a/Riot/Managers/Settings/RiotSettings.swift b/Riot/Managers/Settings/RiotSettings.swift index 784ac171e..dda70179a 100644 --- a/Riot/Managers/Settings/RiotSettings.swift +++ b/Riot/Managers/Settings/RiotSettings.swift @@ -34,6 +34,7 @@ final class RiotSettings: NSObject { static let stunServerFallback = "stunServerFallback" static let hideVerifyThisSessionAlert = "hideVerifyThisSessionAlert" static let hideReviewSessionsAlert = "hideReviewSessionsAlert" + static let matrixApps = "matrixApps" } static let shared = RiotSettings() @@ -62,7 +63,6 @@ final class RiotSettings: NSObject { let showDiscoverySettings: Bool = true let allowIdentityServerConfig: Bool = true let allowLocalContactsAccess: Bool = true - let allowIntegrations: Bool = true let showAdvancedSettings: Bool = true let showLabSettings: Bool = true let allowChangingRageshakeSettings: Bool = true @@ -216,4 +216,12 @@ final class RiotSettings: NSObject { defaults.set(newValue, forKey: UserDefaultsKeys.hideReviewSessionsAlert) } } + + var matrixApps: Bool { + get { + return defaults.bool(forKey: UserDefaultsKeys.matrixApps) + } set { + defaults.set(newValue, forKey: UserDefaultsKeys.matrixApps) + } + } } diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index d729d15c0..7317d826c 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -465,7 +465,7 @@ SettingsIdentityServerCoordinatorBridgePresenterDelegate> [tmpSections addObject:sectionIgnoredUsers]; } - if (RiotSettings.shared.allowIntegrations) + if (RiotSettings.shared.matrixApps) { Section *sectionIntegrations = [Section sectionWithTag:SECTION_TAG_INTEGRATIONS]; [sectionIntegrations addRowWithTag:INTEGRATIONS_INDEX];