Feature/3608 matomo new

This commit is contained in:
Frank Rotermund
2022-09-21 08:54:22 +00:00
parent 087b4e1715
commit c20a0a7bdb
17 changed files with 310 additions and 52 deletions
@@ -228,7 +228,6 @@ typedef NS_ENUM(NSUInteger, LABS_ENABLE)
typedef NS_ENUM(NSUInteger, SECURITY)
{
SECURITY_BUTTON_INDEX = 0,
SECURITY_MATOMO_INDEX,
DEVICE_MANAGER_INDEX
};
@@ -494,12 +493,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
Section *sectionSecurity = [Section sectionWithTag:SECTION_TAG_SECURITY];
[sectionSecurity addRowWithTag:SECURITY_BUTTON_INDEX];
// bwi 2525 - show matomo settings
if ([BuildSettings bwiShowMatomoSettings])
{
[sectionSecurity addRowWithTag:SECURITY_MATOMO_INDEX];
}
if (BuildSettings.deviceManagerEnabled)
{
@@ -2872,19 +2865,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
cell.textLabel.text = [VectorL10n userSessionsSettings];
[cell vc_setAccessoryDisclosureIndicatorWithCurrentTheme];
break;
case SECURITY_MATOMO_INDEX: {
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
labelAndSwitchCell.mxkLabel.text = BWIL10n.matomoSettingsSendDiagnosticData;
labelAndSwitchCell.mxkSwitch.on = RiotSettings.shared.bwiEnableMatomoTracking;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
labelAndSwitchCell.mxkSwitch.enabled = YES;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleEnableMatomoTracking:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
break;
}
}
}
else if (section == SECTION_TAG_DEACTIVATE_ACCOUNT)
@@ -3492,12 +3472,6 @@ ChangePasswordCoordinatorBridgePresenterDelegate>
RiotSettings.shared.showMediaCompressionPrompt = sender.on;
}
- (void)toggleEnableMatomoTracking:(UISwitch *)sender
{
RiotSettings.shared.bwiEnableMatomoTracking = sender.on;
BWIAnalytics.sharedTracker.running = RiotSettings.shared.bwiEnableMatomoTracking;
}
- (void)togglePushNotifications:(UISwitch *)sender
{
// Check first whether the user allow notification from system settings