mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
Feature/3608 matomo new
This commit is contained in:
@@ -178,15 +178,7 @@
|
||||
{
|
||||
MXLogDebug(@"[MasterTabBarController] viewDidAppear");
|
||||
[super viewDidAppear:animated];
|
||||
|
||||
if (BuildSettings.bwiShowMatomoInfoScreen) {
|
||||
NSString *matomoInfoScreenShownKey = @"bwi_matomo_info_screen_shown";
|
||||
if (![[NSUserDefaults standardUserDefaults] boolForKey: matomoInfoScreenShownKey]) {
|
||||
[[NSUserDefaults standardUserDefaults] setBool:TRUE forKey: matomoInfoScreenShownKey];
|
||||
[self bwiShowMatomoInfoScreen];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Display the splash screen only one time although
|
||||
* the viewDidAppear is invoked multiple time in the
|
||||
@@ -1104,6 +1096,10 @@
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if ([BWIAnalytics.sharedTracker needsToShowPromt]) {
|
||||
[self bwiShowMatomoInfoScreen];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) bwiCheckForPersonalNotesRoom {
|
||||
@@ -1135,11 +1131,25 @@
|
||||
#pragma mark - bwi matomo tracking
|
||||
|
||||
- (void) bwiShowMatomoInfoScreen {
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil
|
||||
message:BWIL10n.matomoUserInfo
|
||||
|
||||
UIAlertController *alert = [UIAlertController alertControllerWithTitle:BWIL10n.bwiAnalyticsAlertTitle
|
||||
message:[BWIL10n bwiAnalyticsAlertBody:AppInfo.current.displayName]
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n ok] style:UIAlertActionStyleDefault handler:nil]];
|
||||
[self presentViewController:alert animated:YES completion:nil];
|
||||
|
||||
[alert addAction:[UIAlertAction actionWithTitle:BWIL10n.bwiAnalyticsAlertInfoButton style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
|
||||
WebViewViewController *webViewViewController = [[WebViewViewController alloc] initWithURL:BuildSettings.applicationPrivacyPolicyUrlString];
|
||||
webViewViewController.title = [VectorL10n settingsPrivacyPolicy];
|
||||
[self.navigationController pushViewController:webViewViewController animated:YES];
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:BWIL10n.bwiAnalyticsAlertCancelButton style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
|
||||
BWIAnalytics.sharedTracker.running = NO;
|
||||
}]];
|
||||
[alert addAction:[UIAlertAction actionWithTitle:BWIL10n.bwiAnalyticsAlertOkButton style:UIAlertActionStyleCancel handler:^(UIAlertAction * action) {
|
||||
BWIAnalytics.sharedTracker.running = YES;
|
||||
}]];
|
||||
[self presentViewController:alert animated:YES completion:^() {
|
||||
[BWIAnalytics.sharedTracker setPromtShown:YES];
|
||||
}];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user