mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 09:02:44 +02:00
MXProfiles: Track time to display a message from its notification
This commit is contained in:
@@ -204,6 +204,9 @@
|
||||
|
||||
// Formatted body parser for events
|
||||
FormattedBodyParser *formattedBodyParser;
|
||||
|
||||
// Time to display notification content in the timeline
|
||||
MXTaskProfile *notificationTaskProfile;
|
||||
}
|
||||
|
||||
@property (nonatomic, weak) IBOutlet UIView *overlayContainerView;
|
||||
@@ -500,6 +503,9 @@
|
||||
[self startActivityIndicator];
|
||||
[self.roomDataSource reload];
|
||||
[LegacyAppDelegate theDelegate].lastNavigatedRoomIdFromPush = nil;
|
||||
|
||||
notificationTaskProfile = [MXSDKOptions.sharedInstance.profiler startMeasuringTaskWithName:AnalyticsNoficationsTimeToDisplayContent
|
||||
category:AnalyticsNoficationsCategory];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -842,6 +848,18 @@
|
||||
self.updateRoomReadMarker = NO;
|
||||
}
|
||||
|
||||
- (void)stopActivityIndicator
|
||||
{
|
||||
if (notificationTaskProfile)
|
||||
{
|
||||
// Consider here we have displayed the message corresponding to the notification
|
||||
[MXSDKOptions.sharedInstance.profiler stopMeasuringTaskWithProfile:notificationTaskProfile];
|
||||
notificationTaskProfile = nil;
|
||||
}
|
||||
|
||||
[super stopActivityIndicator];
|
||||
}
|
||||
|
||||
- (void)displayRoom:(MXKRoomDataSource *)dataSource
|
||||
{
|
||||
// Remove potential preview Data
|
||||
|
||||
Reference in New Issue
Block a user