mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
* Fixes #2360 - Add support for manually marking rooms as unread * Add analytics for marking rooms as (un)read * Remove unnecessary analytics abstraction levels * Fix breaking API changes following SDK bump * Add changelog * Handle PR comments * Fix unit tests
This commit is contained in:
@@ -121,11 +121,15 @@ extension AnalyticsService {
|
||||
/// Track the presentation of a screen
|
||||
/// - Parameter screen: The screen that was shown
|
||||
/// - Parameter duration: An optional value representing how long the screen was shown for in milliseconds.
|
||||
func track(screen: AnalyticsScreen, duration milliseconds: Int? = nil) {
|
||||
func track(screen: AnalyticsEvent.MobileScreen.ScreenName, duration milliseconds: Int? = nil) {
|
||||
MXLog.debug("\(screen)")
|
||||
let event = AnalyticsEvent.MobileScreen(durationMs: milliseconds, screenName: screen.screenName)
|
||||
let event = AnalyticsEvent.MobileScreen(durationMs: milliseconds, screenName: screen)
|
||||
client.screen(event)
|
||||
}
|
||||
|
||||
func trackInteraction(index: Int? = nil, name: AnalyticsEvent.Interaction.Name) {
|
||||
capture(event: AnalyticsEvent.Interaction(index: index, interactionType: .Touch, name: name))
|
||||
}
|
||||
|
||||
/// Track the creation of a room
|
||||
/// - Parameter isDM: true if the created room is a direct message, false otherwise
|
||||
@@ -143,12 +147,12 @@ extension AnalyticsService {
|
||||
func trackComposer(inThread: Bool,
|
||||
isEditing: Bool,
|
||||
isReply: Bool,
|
||||
messageType: AnalyticsMessageType = .text,
|
||||
messageType: AnalyticsEvent.Composer.MessageType = .Text,
|
||||
startsThread: Bool?) {
|
||||
capture(event: AnalyticsEvent.Composer(inThread: inThread,
|
||||
isEditing: isEditing,
|
||||
isReply: isReply,
|
||||
messageType: .init(messageType),
|
||||
messageType: messageType,
|
||||
startsThread: startsThread))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user