App Layout: Add usage measures

- Update after review
This commit is contained in:
Gil Eluard 2022-08-24 11:23:59 +02:00 committed by Stefan Ceriu
parent df2838aafe
commit 453b6894ae
2 changed files with 4 additions and 1 deletions

View file

@ -37,6 +37,7 @@ class AllChatsFilterOptions: NSObject {
filterOptionListView.selectedOptionType = AllChatsLayoutSettingsManager.shared.activeFilters
filterOptionListView.selectionChanged = { filter in
guard filter != .all else {
Analytics.shared.trackInteraction(.allChatsFilterAll)
AllChatsLayoutSettingsManager.shared.activeFilters = []
return
}

View file

@ -114,6 +114,8 @@ final class AllChatsLayoutSettingsManager: NSObject {
}
switch activeFilters {
case [], .all:
Analytics.shared.updateUserProperties(allChatsActiveFilter: .all)
case .unreads:
Analytics.shared.updateUserProperties(allChatsActiveFilter: .unreads)
case .favourites:
@ -121,7 +123,7 @@ final class AllChatsLayoutSettingsManager: NSObject {
case .people:
Analytics.shared.updateUserProperties(allChatsActiveFilter: .people)
default:
Analytics.shared.updateUserProperties(allChatsActiveFilter: .all)
Analytics.shared.updateUserProperties(allChatsActiveFilter: nil)
}
}
}