add metrics
This commit is contained in:
@@ -128,21 +128,27 @@ function DialogInner({
|
|||||||
}),
|
}),
|
||||||
)
|
)
|
||||||
if (!activitySubscription.post && !activitySubscription.reply) {
|
if (!activitySubscription.post && !activitySubscription.reply) {
|
||||||
|
logger.metric('activitySubscription:disable', {})
|
||||||
Toast.show(
|
Toast.show(
|
||||||
_(
|
_(
|
||||||
msg`You will no longer receive notifications for ${sanitizeHandle(profile.handle, '@')}`,
|
msg`You will no longer receive notifications for ${sanitizeHandle(profile.handle, '@')}`,
|
||||||
),
|
),
|
||||||
'check',
|
'check',
|
||||||
)
|
)
|
||||||
} else if (!initialState.post && !initialState) {
|
|
||||||
Toast.show(
|
|
||||||
_(
|
|
||||||
msg`You'll start receiving notifications for ${sanitizeHandle(profile.handle, '@')}!`,
|
|
||||||
),
|
|
||||||
'check',
|
|
||||||
)
|
|
||||||
} else {
|
} 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 => {
|
onError: err => {
|
||||||
|
|||||||
@@ -443,4 +443,8 @@ export type MetricEvents = {
|
|||||||
[key: string]: any
|
[key: string]: any
|
||||||
}
|
}
|
||||||
'thread:click:headerMenuOpen': {}
|
'thread:click:headerMenuOpen': {}
|
||||||
|
'activitySubscription:enable': {
|
||||||
|
setting: 'posts' | 'posts_and_replies'
|
||||||
|
}
|
||||||
|
'activitySubscription:disable': {}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user