mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
MESSENGER-5938 activate labs
This commit is contained in:
@@ -306,6 +306,9 @@ SSOAuthenticationPresenterDelegate>
|
||||
// New email address to bind
|
||||
UITextField* newEmailTextField;
|
||||
|
||||
// bwi: #5938 activate lab
|
||||
int countActivateLabs;
|
||||
|
||||
// New phone number to bind
|
||||
TableViewCellWithPhoneNumberTextField * newPhoneNumberCell;
|
||||
CountryPickerViewController *newPhoneNumberCountryPicker;
|
||||
@@ -2755,6 +2758,13 @@ SSOAuthenticationPresenterDelegate>
|
||||
|
||||
versionCell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
|
||||
// bwi: #5938 activate lab
|
||||
if (!versionCell.gestureRecognizers.count)
|
||||
{
|
||||
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onElementVersionTap)];
|
||||
[versionCell addGestureRecognizer:tap];
|
||||
}
|
||||
|
||||
cell = versionCell;
|
||||
}
|
||||
else if (row == ABOUT_TERM_CONDITIONS_INDEX)
|
||||
@@ -4571,6 +4581,37 @@ SSOAuthenticationPresenterDelegate>
|
||||
}
|
||||
}
|
||||
|
||||
// bwi: #5938 activate lab
|
||||
- (void)onElementVersionTap
|
||||
{
|
||||
if (!countActivateLabs) {
|
||||
countActivateLabs = 0;
|
||||
}
|
||||
if (countActivateLabs >= 6)
|
||||
{
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
countActivateLabs += 1;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)showThemePicker
|
||||
{
|
||||
__weak typeof(self) weakSelf = self;
|
||||
|
||||
Reference in New Issue
Block a user