add metrics

This commit is contained in:
Samuel Newman
2025-06-27 18:22:07 +03:00
parent 83e423f78a
commit 4ab1350e67
2 changed files with 18 additions and 8 deletions
@@ -128,21 +128,27 @@ function DialogInner({
}),
)
if (!activitySubscription.post && !activitySubscription.reply) {
logger.metric('activitySubscription:disable', {})
Toast.show(
_(
msg`You will no longer receive notifications for ${sanitizeHandle(profile.handle, '@')}`,
),
'check',
)
} else if (!initialState.post && !initialState) {
Toast.show(
_(
msg`You'll start receiving notifications for ${sanitizeHandle(profile.handle, '@')}!`,
),
'check',
)
} else {
Toast.show(_(msg`Changes saved`), 'check')
logger.metric('activitySubscription:enable', {
setting: activitySubscription.reply ? 'posts_and_replies' : 'posts',
})
if (!initialState.post && !initialState.reply) {
Toast.show(
_(
msg`You'll start receiving notifications for ${sanitizeHandle(profile.handle, '@')}!`,
),
'check',
)
} else {
Toast.show(_(msg`Changes saved`), 'check')
}
}
},
onError: err => {
+4
View File
@@ -443,4 +443,8 @@ export type MetricEvents = {
[key: string]: any
}
'thread:click:headerMenuOpen': {}
'activitySubscription:enable': {
setting: 'posts' | 'posts_and_replies'
}
'activitySubscription:disable': {}
}