Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Matomo missing actions #1033

Merged
merged 3 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Mail/Views/New Message/Attachments/AttachmentUploadCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import InfomaniakCoreUI
import InfomaniakDI
import MailCore
import MailResources
import SwiftUI
Expand All @@ -34,6 +36,8 @@ struct AttachmentUploadCell: View {
) {
Button {
if let attachmentRemoved {
@InjectService var matomo: MatomoUtils
matomo.track(eventWithCategory: .attachmentActions, name: "delete")
attachmentRemoved(attachment)
}
} label: {
Expand Down
4 changes: 4 additions & 0 deletions Mail/Views/Settings/General/SettingsThreadModeView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import InfomaniakCoreUI
import InfomaniakDI
import MailCore
import MailResources
import SwiftUI
Expand Down Expand Up @@ -46,6 +48,8 @@ struct SettingsThreadModeView: View {
isLast: value == ThreadMode.allCases.last
) {
if value != selectedValue {
@InjectService var matomo: MatomoUtils
matomo.track(eventWithCategory: .settingsThreadMode, name: value.rawValue)
threadModeSettingUpdate = ThreadModeSettingUpdate(newSetting: value)
}
}
Expand Down
1 change: 1 addition & 0 deletions Mail/Views/Thread List/ThreadListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ struct ThreadListView: View {
}
Task {
await tryOrDisplayError {
matomo.track(eventWithCategory: .threadList, name: "loadMore")
_ = try await viewModel.mailboxManager.fetchOnePage(
folder: viewModel.folder.freeze(),
direction: .previous
Expand Down
1 change: 1 addition & 0 deletions MailCore/Utils/Matomo+Extension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ public extension MatomoUtils.EventCategory {
static let settingsTheme = MatomoUtils.EventCategory(displayName: "settingsTheme")
static let settingsSend = MatomoUtils.EventCategory(displayName: "settingsSend")
static let settingsSwipeActions = MatomoUtils.EventCategory(displayName: "settingsSwipeActions")
static let settingsThreadMode = MatomoUtils.EventCategory(displayName: "settingsThreadMode")
static let settingsDisplayExternalContent = MatomoUtils.EventCategory(displayName: "settingsDisplayExternalContent")
}

Expand Down
Loading