Add metrics for when OPs click "hide reply for me" or "hide reply for everyone" (#9206)
This commit is contained in:
@@ -258,6 +258,7 @@ let PostMenuItems = ({
|
|||||||
|
|
||||||
const onHidePost = () => {
|
const onHidePost = () => {
|
||||||
hidePost({uri: postUri})
|
hidePost({uri: postUri})
|
||||||
|
logEvent('thread:click:hideReplyForMe', {})
|
||||||
}
|
}
|
||||||
|
|
||||||
const hideInPWI = !!postAuthor.labels?.find(
|
const hideInPWI = !!postAuthor.labels?.find(
|
||||||
@@ -338,6 +339,12 @@ let PostMenuItems = ({
|
|||||||
replyUri: postUri,
|
replyUri: postUri,
|
||||||
action,
|
action,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Log metric only when hiding (not when showing)
|
||||||
|
if (isHide) {
|
||||||
|
logEvent('thread:click:hideReplyForEveryone', {})
|
||||||
|
}
|
||||||
|
|
||||||
Toast.show(
|
Toast.show(
|
||||||
isHide
|
isHide
|
||||||
? _(msg`Reply was successfully hidden`)
|
? _(msg`Reply was successfully hidden`)
|
||||||
|
|||||||
@@ -481,6 +481,8 @@ export type MetricEvents = {
|
|||||||
'share:press:embed': {}
|
'share:press:embed': {}
|
||||||
|
|
||||||
'thread:click:showOtherReplies': {}
|
'thread:click:showOtherReplies': {}
|
||||||
|
'thread:click:hideReplyForMe': {}
|
||||||
|
'thread:click:hideReplyForEveryone': {}
|
||||||
'thread:preferences:load': {
|
'thread:preferences:load': {
|
||||||
[key: string]: any
|
[key: string]: any
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user