From f9f971a19dba1ffb25936934ee2bf162b702f476 Mon Sep 17 00:00:00 2001 From: Valentin Perignon Date: Tue, 4 Apr 2023 16:19:21 +0200 Subject: [PATCH] chore: Update Matomo event names --- Mail/Views/Bottom sheets/Actions/ActionsViewModel.swift | 2 +- Mail/Views/Thread List/FlushFolderAlertView.swift | 2 +- Mail/Views/Thread List/ThreadListMultipleSectionViewModel.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Mail/Views/Bottom sheets/Actions/ActionsViewModel.swift b/Mail/Views/Bottom sheets/Actions/ActionsViewModel.swift index 3e8c65dd1..75e8a9c86 100644 --- a/Mail/Views/Bottom sheets/Actions/ActionsViewModel.swift +++ b/Mail/Views/Bottom sheets/Actions/ActionsViewModel.swift @@ -293,7 +293,7 @@ enum ActionsTarget: Equatable { globalSheet.close() if let matomoCategory, let matomoName = action.matomoName { if case let .threads(threads, isMultipleSelectionEnabled) = target, isMultipleSelectionEnabled { - matomo.trackBulkEvent(eventWithCategory: matomoCategory, name: matomoName, numberOfItems: threads.count) + matomo.trackBulkEvent(eventWithCategory: matomoCategory, name: matomoName.capitalized, numberOfItems: threads.count) } else { matomo.track(eventWithCategory: matomoCategory, name: matomoName) } diff --git a/Mail/Views/Thread List/FlushFolderAlertView.swift b/Mail/Views/Thread List/FlushFolderAlertView.swift index 9b40a598d..e3a18a476 100644 --- a/Mail/Views/Thread List/FlushFolderAlertView.swift +++ b/Mail/Views/Thread List/FlushFolderAlertView.swift @@ -59,7 +59,7 @@ struct FlushFolderAlertView: View { secondaryButtonTitle: MailResourcesStrings.Localizable.buttonClose) { if let folder, flushAlert.deletedMessages == nil { @InjectService var matomo: MatomoUtils - matomo.track(eventWithCategory: .threadList, name: "empty\(folder.matomoName)Confirm") + matomo.track(eventWithCategory: .threadList, name: "empty\(folder.matomoName.capitalized)Confirm") } Task { await flushAlert.completion() diff --git a/Mail/Views/Thread List/ThreadListMultipleSectionViewModel.swift b/Mail/Views/Thread List/ThreadListMultipleSectionViewModel.swift index a4974f3ba..83c07202c 100644 --- a/Mail/Views/Thread List/ThreadListMultipleSectionViewModel.swift +++ b/Mail/Views/Thread List/ThreadListMultipleSectionViewModel.swift @@ -72,7 +72,7 @@ import SwiftUI func didTap(action: Action, flushAlert: Binding) async throws { if let matomoName = action.matomoName { - matomo.trackBulkEvent(eventWithCategory: .threadActions, name: matomoName, numberOfItems: selectedItems.count) + matomo.trackBulkEvent(eventWithCategory: .threadActions, name: matomoName.capitalized, numberOfItems: selectedItems.count) } switch action { case .markAsRead, .markAsUnread: