Skip to content

Commit

Permalink
Merge pull request #594 from tchapgouv/phlpro/576-settings
Browse files Browse the repository at this point in the history
[Settings] Move back to Element settings screen #576
  • Loading branch information
Phl-Pro authored Jul 26, 2022
2 parents 5bdc87e + 20dd55d commit aa8dd59
Show file tree
Hide file tree
Showing 26 changed files with 1,282 additions and 176 deletions.
18 changes: 9 additions & 9 deletions Btchap/Config/BuildSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -171,13 +171,13 @@ final class BuildSettings: NSObject {
static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: false,
host: "",
apiKey: "",
termsURL: URL(string: "")!)
termsURL: URL(string: "https://")!)
#else
/// The configuration to use for analytics. Set `isEnabled` to false to disable analytics.
static let analyticsConfiguration = AnalyticsConfiguration(isEnabled: false,
host: "",
apiKey: "",
termsURL: URL(string: "")!)
termsURL: URL(string: "https://")!)
#endif

// MARK: - Bug report
Expand Down Expand Up @@ -259,22 +259,22 @@ final class BuildSettings: NSObject {

static let settingsScreenShowUserFirstName: Bool = false
static let settingsScreenShowUserSurname: Bool = false
static let settingsScreenAllowAddingEmailThreepids: Bool = true
static let settingsScreenAllowAddingPhoneThreepids: Bool = true
static let settingsScreenShowThreepidExplanatory: Bool = true
static let settingsScreenShowDiscoverySettings: Bool = true
static let settingsScreenAllowIdentityServerConfig: Bool = true
static let settingsScreenAllowAddingEmailThreepids: Bool = false
static let settingsScreenAllowAddingPhoneThreepids: Bool = false
static let settingsScreenShowThreepidExplanatory: Bool = false
static let settingsScreenShowDiscoverySettings: Bool = false
static let settingsScreenAllowIdentityServerConfig: Bool = false
static let settingsScreenShowConfirmMediaSize: Bool = true
static let settingsScreenShowAdvancedSettings: Bool = true
static let settingsScreenShowLabSettings: Bool = true
static let settingsScreenShowLabSettings: Bool = false
static let settingsScreenAllowChangingRageshakeSettings: Bool = true
static let settingsScreenAllowChangingCrashUsageDataSettings: Bool = true
static let settingsScreenAllowBugReportingManually: Bool = true
static let settingsScreenAllowDeactivatingAccount: Bool = true
static let settingsScreenShowChangePassword: Bool = true
static let settingsScreenShowEnableStunServerFallback: Bool = true
static let settingsScreenShowNotificationDecodedContentOption: Bool = true
static let settingsScreenShowNsfwRoomsOption: Bool = true
static let settingsScreenShowNsfwRoomsOption: Bool = false
static let settingsSecurityScreenShowSessions: Bool = true
static let settingsSecurityScreenShowSetupBackup: Bool = true
static let settingsSecurityScreenShowRestoreBackup: Bool = true
Expand Down
7 changes: 7 additions & 0 deletions Btchap/target.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ targets:
- "Modules/Room/Views/Preview"
- "Modules/Room/Views/Title/RoomTitleView.*"
- "Modules/Rooms"
- "Modules/Settings/SettingsViewController.*"
- "SupportingFiles/Info.plist"
- "TchapTools"
- "Routers"
Expand Down Expand Up @@ -133,6 +134,7 @@ targets:
- path: ../Riot/Managers/Call/AsyncOperation.swift
- path: ../Riot/Managers/EncryptionKeyManager/EncryptionKeyManager.swift
- path: ../Riot/Managers/KeyValueStorage
- path: ../Riot/Managers/LocalAuthentication
- path: ../Riot/Managers/Locale
- path: ../Riot/Managers/Logging
- path: ../Riot/Managers/Room/RoomIdComponents.swift
Expand Down Expand Up @@ -186,6 +188,7 @@ targets:
- path: ../Riot/Modules/Common/Recents/Service
- path: ../Riot/Modules/Common/Recents/Views
- path: ../Riot/Modules/Common/Recents/RecentsViewController+RoomInvite.swift
- path: ../Riot/Modules/Common/SectionFooters
- path: ../Riot/Modules/Common/SectionHeaders
- path: ../Riot/Modules/Common/SegmentedViewController/SegmentedViewController.h
- path: ../Riot/Modules/Common/SegmentedViewController/SegmentedViewController.m
Expand All @@ -194,6 +197,8 @@ targets:
- path: ../Riot/Modules/Common/UserIndicators
- path: ../Riot/Modules/Common/Views
- path: ../Riot/Modules/Common/WebViewController
- path: ../Riot/Modules/Communities/DataSources
- path: ../Riot/Modules/Communities/Views
- path: ../Riot/Modules/Contacts
- path: ../Riot/Modules/CreateRoom
- path: ../Riot/Modules/CrossSigning
Expand Down Expand Up @@ -242,6 +247,8 @@ targets:
- path: ../Riot/Modules/Secrets
- path: ../Riot/Modules/SecureBackup
- path: ../Riot/Modules/ServiceTerms
- path: ../Riot/Modules/SetPinCode
- path: ../Riot/Modules/Settings
- path: ../Riot/Modules/SideMenu
- path: ../Riot/Modules/SlidingModal
- path: ../Riot/Modules/SplitView
Expand Down
30 changes: 15 additions & 15 deletions Config/BuildSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -278,29 +278,29 @@ final class BuildSettings: NSObject {

static let settingsScreenShowUserFirstName: Bool = false
static let settingsScreenShowUserSurname: Bool = false
static let settingsScreenAllowAddingEmailThreepids: Bool = true
static let settingsScreenAllowAddingPhoneThreepids: Bool = true
static let settingsScreenShowThreepidExplanatory: Bool = true
static let settingsScreenShowDiscoverySettings: Bool = true
static let settingsScreenAllowIdentityServerConfig: Bool = true
static let settingsScreenAllowAddingEmailThreepids: Bool = false
static let settingsScreenAllowAddingPhoneThreepids: Bool = false
static let settingsScreenShowThreepidExplanatory: Bool = false
static let settingsScreenShowDiscoverySettings: Bool = false
static let settingsScreenAllowIdentityServerConfig: Bool = false
static let settingsScreenShowConfirmMediaSize: Bool = true
static let settingsScreenShowAdvancedSettings: Bool = true
static let settingsScreenShowLabSettings: Bool = true
static let settingsScreenShowLabSettings: Bool = false
static let settingsScreenAllowChangingRageshakeSettings: Bool = true
static let settingsScreenAllowChangingCrashUsageDataSettings: Bool = true
static let settingsScreenAllowBugReportingManually: Bool = true
static let settingsScreenAllowDeactivatingAccount: Bool = true
static let settingsScreenShowChangePassword:Bool = true
static let settingsScreenShowChangePassword: Bool = true
static let settingsScreenShowEnableStunServerFallback: Bool = true
static let settingsScreenShowNotificationDecodedContentOption: Bool = true
static let settingsScreenShowNsfwRoomsOption: Bool = true
static let settingsSecurityScreenShowSessions:Bool = true
static let settingsSecurityScreenShowSetupBackup:Bool = true
static let settingsSecurityScreenShowRestoreBackup:Bool = true
static let settingsSecurityScreenShowDeleteBackup:Bool = true
static let settingsSecurityScreenShowCryptographyInfo:Bool = true
static let settingsSecurityScreenShowCryptographyExport:Bool = true
static let settingsSecurityScreenShowAdvancedUnverifiedDevices:Bool = true
static let settingsScreenShowNsfwRoomsOption: Bool = false
static let settingsSecurityScreenShowSessions: Bool = true
static let settingsSecurityScreenShowSetupBackup: Bool = true
static let settingsSecurityScreenShowRestoreBackup: Bool = true
static let settingsSecurityScreenShowDeleteBackup: Bool = true
static let settingsSecurityScreenShowCryptographyInfo: Bool = true
static let settingsSecurityScreenShowCryptographyExport: Bool = true
static let settingsSecurityScreenShowAdvancedUnverifiedDevices: Bool = true
/// A setting to enable the presence configuration settings section.
static let settingsScreenPresenceAllowConfiguration: Bool = false

Expand Down
2 changes: 1 addition & 1 deletion Riot/Assets/fr.lproj/Vector.strings
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@
"settings_ignored_users" = "UTILISATEURS IGNORÉS";
"settings_contacts" = "CONTACTS LOCAUX";
"settings_advanced" = "AVANCÉ";
"settings_other" = "AUTRES";
"settings_other" = "Autres";
"settings_labs" = "EXPÉRIMENTAL";
"settings_devices" = "APPAREILS";
"settings_cryptography" = "CHIFFREMENT";
Expand Down
24 changes: 24 additions & 0 deletions Riot/Modules/Communities/DataSources/GroupsDataSource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/*
Copyright 2017 Vector Creations Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

#import "MatrixKit.h"

/**
'GroupsDataSource' class inherits from 'MXKSessionGroupsDataSource' to define the Riot groups source.
*/
@interface GroupsDataSource : MXKSessionGroupsDataSource

@end
34 changes: 18 additions & 16 deletions Riot/Modules/Communities/DataSources/GroupsDataSource.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#import "GroupsDataSource.h"
#import "GeneratedInterface-Swift.h"

@interface GroupsDataSource() <BetaAnnounceCellDelegate>
@interface GroupsDataSource() //<BetaAnnounceCellDelegate>

@property (nonatomic) NSInteger betaAnnounceSection;
@property (nonatomic) BOOL showBetaAnnounce;
Expand Down Expand Up @@ -65,15 +65,16 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section == self.betaAnnounceSection)
{
BetaAnnounceCell *cell = [tableView dequeueReusableCellWithIdentifier:BetaAnnounceCell.reuseIdentifier forIndexPath:indexPath];
[cell vc_hideSeparator];
[cell updateWithTheme:ThemeService.shared.theme];
cell.delegate = self;
return cell;

}
// Tchap: Disable Spaces
// if (indexPath.section == self.betaAnnounceSection)
// {
// BetaAnnounceCell *cell = [tableView dequeueReusableCellWithIdentifier:BetaAnnounceCell.reuseIdentifier forIndexPath:indexPath];
// [cell vc_hideSeparator];
// [cell updateWithTheme:ThemeService.shared.theme];
// cell.delegate = self;
// return cell;
//
// }

return [super tableView:tableView cellForRowAtIndexPath:indexPath];
}
Expand Down Expand Up @@ -116,11 +117,12 @@ - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)

#pragma mark - BetaAnnounceCellDelegate

- (void)betaAnnounceCellDidTapCloseButton:(BetaAnnounceCell *)cell
{
self.showBetaAnnounce = NO;
RiotSettings.shared.hideSpaceBetaAnnounce = YES;
[self.delegate dataSource:self didCellChange:nil];
}
// Tchap: Disable Spaces
//- (void)betaAnnounceCellDidTapCloseButton:(BetaAnnounceCell *)cell
//{
// self.showBetaAnnounce = NO;
// RiotSettings.shared.hideSpaceBetaAnnounce = YES;
// [self.delegate dataSource:self didCellChange:nil];
//}

@end
Loading

0 comments on commit aa8dd59

Please sign in to comment.