mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 16:42:44 +02:00
Add AnalyticsScreenTimer and track more screens.
Update Analytics with new methods in MXAnalyticsDelegate.
This commit is contained in:
@@ -134,8 +134,6 @@
|
||||
|
||||
NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNotification";
|
||||
NSNotificationName const RoomGroupCallTileTappedNotification = @"RoomGroupCallTileTappedNotification";
|
||||
NSString * const RoomAnalyticsNotificationsCategory = @"notifications";
|
||||
NSString * const RoomAnalyticsNotificationsTimeToDisplayContent = @"timelineDisplay";
|
||||
const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
|
||||
@interface RoomViewController () <UISearchBarDelegate, UIGestureRecognizerDelegate, UIScrollViewAccessibilityDelegate, RoomTitleViewTapGestureDelegate, RoomParticipantsViewControllerDelegate, MXKRoomMemberDetailsViewControllerDelegate, ContactsTableViewControllerDelegate, MXServerNoticesDelegate, RoomContextualMenuViewControllerDelegate,
|
||||
@@ -258,6 +256,8 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
@property (nonatomic, strong) UserSuggestionCoordinatorBridge *userSuggestionCoordinator;
|
||||
@property (nonatomic, weak) IBOutlet UIView *userSuggestionContainerView;
|
||||
|
||||
@property (nonatomic) AnalyticsScreenTimer *screenTimer;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RoomViewController
|
||||
@@ -340,6 +340,8 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
|
||||
_voiceMessageController = [[VoiceMessageController alloc] initWithThemeService:ThemeService.shared mediaServiceProvider:VoiceMessageMediaServiceProvider.sharedProvider];
|
||||
self.voiceMessageController.delegate = self;
|
||||
|
||||
self.screenTimer = [[AnalyticsScreenTimer alloc] initWithScreen:AnalyticsScreenRoom];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
@@ -569,9 +571,6 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
// Screen tracking
|
||||
[Analytics.shared trackScreen:AnalyticsScreenRoom];
|
||||
|
||||
// Refresh the room title view
|
||||
[self refreshRoomTitle];
|
||||
|
||||
@@ -612,8 +611,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
[self.roomDataSource reload];
|
||||
[LegacyAppDelegate theDelegate].lastNavigatedRoomIdFromPush = nil;
|
||||
|
||||
notificationTaskProfile = [MXSDKOptions.sharedInstance.profiler startMeasuringTaskWithName:RoomAnalyticsNotificationsTimeToDisplayContent
|
||||
category:RoomAnalyticsNotificationsCategory];
|
||||
notificationTaskProfile = [MXSDKOptions.sharedInstance.profiler startMeasuringTaskWithName:MXTaskProfileNameNotificationsOpenEvent];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -709,6 +707,9 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
hasJitsiCall = NO;
|
||||
[self reloadBubblesTable:YES];
|
||||
}
|
||||
|
||||
// Screen tracking
|
||||
[self.screenTimer start];
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated
|
||||
@@ -744,6 +745,8 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
||||
hasJitsiCall = YES;
|
||||
[self reloadBubblesTable:YES];
|
||||
}
|
||||
|
||||
[self.screenTimer stop];
|
||||
}
|
||||
|
||||
- (void)viewDidLayoutSubviews
|
||||
|
||||
Reference in New Issue
Block a user