diff --git a/Riot/Assets/de.lproj/Bwi.strings b/Riot/Assets/de.lproj/Bwi.strings index 47c071e4b..aa3eee8b1 100644 --- a/Riot/Assets/de.lproj/Bwi.strings +++ b/Riot/Assets/de.lproj/Bwi.strings @@ -71,6 +71,7 @@ "bwi_settings_developer_key_backup_version" = "Version"; // MARK: Labor +"bwi_activate_labs_alert_title" = "Labor ist jetzt verfügbar"; "bwi_settings_labs_federation_feature" = "Föderation"; // MARK: - MDM diff --git a/Riot/Assets/en.lproj/Bwi.strings b/Riot/Assets/en.lproj/Bwi.strings index 17296c827..a92be8fb0 100644 --- a/Riot/Assets/en.lproj/Bwi.strings +++ b/Riot/Assets/en.lproj/Bwi.strings @@ -72,6 +72,7 @@ "bwi_settings_developer_key_backup_version" = "Version"; // MARK: Lab +"bwi_activate_labs_alert_title" = "Labs now available"; "bwi_settings_labs_federation_feature" = "Federation"; // MARK: - MDM diff --git a/Riot/Generated/BWIStrings.swift b/Riot/Generated/BWIStrings.swift index df6af2d26..d55af59f1 100644 --- a/Riot/Generated/BWIStrings.swift +++ b/Riot/Generated/BWIStrings.swift @@ -127,6 +127,10 @@ public class BWIL10n: NSObject { public static var bwiAccessibilityDeclarationButtonTitle: String { return BWIL10n.tr("Bwi", "bwi_accessibility_declaration_button_title") } + /// Labor ist jetzt verfügbar + public static var bwiActivateLabsAlertTitle: String { + return BWIL10n.tr("Bwi", "bwi_activate_labs_alert_title") + } /// Wir brauchen Deine Hilfe, um Fehler im %@ besser analysieren zu können. Dazu würden wir gerne anonymisierte Diagnosedaten erfassen. Es werden keine Daten an Dritte übermittelt. Details findest Du in der Datenschutzerklärung.\n\nFalls Du nicht mehr mithelfen möchtest, kannst Du dies in den Einstellungen jederzeit wieder deaktivieren.\n\nMöchtest du bei der Fehler-Analyse unterstützen? public static func bwiAnalyticsAlertBody(_ p1: String) -> String { return BWIL10n.tr("Bwi", "bwi_analytics_alert_body", p1) diff --git a/Riot/Modules/Settings/SettingsViewController.m b/Riot/Modules/Settings/SettingsViewController.m index fdee09944..b309222e6 100644 --- a/Riot/Modules/Settings/SettingsViewController.m +++ b/Riot/Modules/Settings/SettingsViewController.m @@ -306,6 +306,7 @@ SSOAuthenticationPresenterDelegate> // New email address to bind UITextField* newEmailTextField; + // New phone number to bind TableViewCellWithPhoneNumberTextField * newPhoneNumberCell; CountryPickerViewController *newPhoneNumberCountryPicker; @@ -2755,6 +2756,14 @@ SSOAuthenticationPresenterDelegate> versionCell.selectionStyle = UITableViewCellSelectionStyleNone; + // bwi: #5938 activate lab + if (!versionCell.gestureRecognizers.count) + { + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onElementVersionTap)]; + [tap setNumberOfTapsRequired:7]; + [versionCell addGestureRecognizer:tap]; + } + cell = versionCell; } else if (row == ABOUT_TERM_CONDITIONS_INDEX) @@ -4571,6 +4580,30 @@ SSOAuthenticationPresenterDelegate> } } +// bwi: #5938 activate lab +- (void)onElementVersionTap +{ + if (!BWIBuildSettings.shared.settingsScreenShowLabSettings) + { + BWIBuildSettings.shared.settingsScreenShowLabSettings = true; + [self updateSections]; + + MXWeakify(self); + [currentAlert dismissViewControllerAnimated:NO completion:nil]; + UIAlertController *successAlert = [UIAlertController alertControllerWithTitle:[BWIL10n bwiActivateLabsAlertTitle] + message:nil + preferredStyle:UIAlertControllerStyleAlert]; + + [successAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok] style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) { + MXStrongifyAndReturnIfNil(self); + self->currentAlert = nil; + }]]; + + [self presentViewController:successAlert animated:YES completion:nil]; + currentAlert = successAlert; + } +} + - (void)showThemePicker { __weak typeof(self) weakSelf = self;