Analytics: Move code from AppDelegate to a dedicated class: Analytics

This commit is contained in:
manuroe
2018-06-27 09:55:06 +02:00
parent 610e8fe691
commit 054b2afded
38 changed files with 232 additions and 112 deletions
+3 -3
View File
@@ -423,7 +423,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
[super viewWillAppear:animated];
// Screen tracking
[[AppDelegate theDelegate] trackScreen:@"Settings"];
[[Analytics sharedInstance] trackScreen:@"Settings"];
// Release the potential pushed view controller
[self releasePushedViewController];
@@ -2854,7 +2854,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
[[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"enableCrashReport"];
[[NSUserDefaults standardUserDefaults] synchronize];
[[AppDelegate theDelegate] stopAnalytics];
[[Analytics sharedInstance] stop];
// Remove potential crash file.
[MXLogger deleteCrashLog];
@@ -2865,7 +2865,7 @@ typedef void (^blockSettingsViewController_onReadyToDestroy)();
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:@"enableCrashReport"];
[[NSUserDefaults standardUserDefaults] synchronize];
[[AppDelegate theDelegate] startAnalytics];
[[Analytics sharedInstance] start];
}
}