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.selectedOptionType = AllChatsLayoutSettingsManager.shared.activeFilters
filterOptionListView.selectionChanged = { filter in filterOptionListView.selectionChanged = { filter in
guard filter != .all else { guard filter != .all else {
Analytics.shared.trackInteraction(.allChatsFilterAll)
AllChatsLayoutSettingsManager.shared.activeFilters = [] AllChatsLayoutSettingsManager.shared.activeFilters = []
return return
} }

View file

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