mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
MESSENGER-5938 add condition
This commit is contained in:
@@ -4584,31 +4584,34 @@ SSOAuthenticationPresenterDelegate>
|
||||
// bwi: #5938 activate lab
|
||||
- (void)onElementVersionTap
|
||||
{
|
||||
if (!countActivateLabs) {
|
||||
countActivateLabs = 0;
|
||||
}
|
||||
if (countActivateLabs >= 6)
|
||||
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;
|
||||
}
|
||||
else
|
||||
{
|
||||
countActivateLabs += 1;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user