Merge branch 'develop' into ismail/5068_start_thread

This commit is contained in:
ismailgulek
2021-12-09 15:25:14 +03:00
765 changed files with 94930 additions and 1211 deletions
+23 -6
View File
@@ -18,8 +18,6 @@
#import "SettingsViewController.h"
#import <MatrixKit/MatrixKit.h>
#import <OLMKit/OLMKit.h>
#import "AvatarGenerator.h"
@@ -43,6 +41,8 @@
#import "GBDeviceInfo_iOS.h"
#import "MediaPickerViewController.h"
#import "GeneratedInterface-Swift.h"
NSString* const kSettingsViewControllerPhoneBookCountryCellId = @"kSettingsViewControllerPhoneBookCountryCellId";
@@ -153,9 +153,10 @@ enum
ABOUT_THIRD_PARTY_INDEX,
};
enum
typedef NS_ENUM(NSUInteger, LABS_ENABLE)
{
LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX = 0,
LABS_ENABLE_POLLS,
LABS_ENABLE_THREADS_INDEX
};
@@ -168,7 +169,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)(void);
#pragma mark - SettingsViewController
@interface SettingsViewController () <DeactivateAccountViewControllerDelegate,
@interface SettingsViewController () <UITextFieldDelegate, MXKCountryPickerViewControllerDelegate, MXKLanguagePickerViewControllerDelegate, MXKDataSourceDelegate, DeactivateAccountViewControllerDelegate,
NotificationSettingsCoordinatorBridgePresenterDelegate,
SecureBackupSetupCoordinatorBridgePresenterDelegate,
SignOutAlertPresenterDelegate,
@@ -552,6 +553,7 @@ TableViewSectionsDelegate>
{
Section *sectionLabs = [Section sectionWithTag:SECTION_TAG_LABS];
[sectionLabs addRowWithTag:LABS_ENABLE_RINGING_FOR_GROUP_CALLS_INDEX];
[sectionLabs addRowWithTag:LABS_ENABLE_POLLS];
[sectionLabs addRowWithTag:LABS_ENABLE_THREADS_INDEX];
sectionLabs.headerTitle = [VectorL10n settingsLabs];
if (sectionLabs.hasAnyRows)
@@ -2403,6 +2405,18 @@ TableViewSectionsDelegate>
cell = labelAndSwitchCell;
}
else if (row == LABS_ENABLE_POLLS && BuildSettings.pollsEnabled)
{
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
labelAndSwitchCell.mxkLabel.text = [VectorL10n settingsLabsEnabledPolls];
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.roomScreenAllowPollsAction;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnablePolls:) forControlEvents:UIControlEventValueChanged];
cell = labelAndSwitchCell;
}
else if (row == LABS_ENABLE_THREADS_INDEX)
{
MXKTableViewCellWithLabelAndSwitch *labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
@@ -2412,8 +2426,6 @@ TableViewSectionsDelegate>
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableThreads:) forControlEvents:UIControlEventValueChanged];
cell = labelAndSwitchCell;
}
}
else if (section == SECTION_TAG_FLAIR)
@@ -3149,6 +3161,11 @@ TableViewSectionsDelegate>
RiotSettings.shared.enableRingingForGroupCalls = sender.isOn;
}
- (void)toggleEnablePolls:(UISwitch *)sender
{
RiotSettings.shared.roomScreenAllowPollsAction = sender.isOn;
}
- (void)toggleEnableThreads:(UISwitch *)sender
{
RiotSettings.shared.enableThreads = sender.isOn;