mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-25 11:02:48 +02:00
MESSENGER-3681 Updated birthday banner for second anniversary campaign
This commit is contained in:
committed by
Frank Rotermund
parent
5b0e259f78
commit
02a0b64ec6
@@ -1054,6 +1054,30 @@
|
||||
if ([BWIAnalytics.sharedTracker needsToShowPromt]) {
|
||||
[self bwiShowMatomoInfoScreen];
|
||||
}
|
||||
if ([BWIBuildSettings.shared bwiShowHappyBirthdayCampaign]) {
|
||||
[self showHappyBirthdayScreen];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)showHappyBirthdayScreen {
|
||||
MXSession *session = mxSessionArray.firstObject;
|
||||
if (session) {
|
||||
__block RiotSharedSettings *sharedSettings = [[RiotSharedSettings alloc] initWithSession:session];
|
||||
NSString *identifier = [BWIBuildSettings.shared bwiHappyBirthdayCampaignIdentifier];
|
||||
if( [sharedSettings happyBirthdayCampaignFor:identifier] ) {
|
||||
UIViewController *controller = [HappyBirthdayViewController makeViewController] ;
|
||||
controller.modalPresentationStyle = UIModalPresentationFullScreen;
|
||||
[self presentViewController:controller animated:YES completion:nil];
|
||||
[sharedSettings setHappyBirthdayCampaign:identifier
|
||||
enabled:FALSE
|
||||
success:^{
|
||||
sharedSettings = nil;
|
||||
} failure:^(NSError * _Nullable error) {
|
||||
MXLogDebug(@"[HappyBirthdayCampaign] could not set flag in account data. Error: %@", error);
|
||||
sharedSettings = nil;
|
||||
}];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void) bwiCheckForPersonalNotesRoom {
|
||||
|
||||
Reference in New Issue
Block a user