honestly not sure why i didnt do this originally, my original code made 0 sense
+4
-3
Diff
round #0
+4
-3
src/components/PostControls/index.tsx
+4
-3
src/components/PostControls/index.tsx
···
16
16
import {type Shadow} from '#/state/cache/types'
17
17
import {useFeedFeedbackContext} from '#/state/feed-feedback'
18
18
import {useDisableLikesMetrics} from '#/state/preferences/disable-likes-metrics'
19
+
import {useDisableQuotesMetrics} from '#/state/preferences/disable-quotes-metrics'
19
20
import {useDisableReplyMetrics} from '#/state/preferences/disable-reply-metrics'
20
21
import {useDisableRepostsMetrics} from '#/state/preferences/disable-reposts-metrics'
21
22
import {
···
109
110
const disableLikesMetrics = useDisableLikesMetrics()
110
111
const disableRepostsMetrics = useDisableRepostsMetrics()
111
112
const disableReplyMetrics = useDisableReplyMetrics()
113
+
const disableQuotesMetrics = useDisableQuotesMetrics()
112
114
113
115
const onPressToggleLike = async () => {
114
116
if (isBlocked) {
···
271
273
<RepostButton
272
274
isReposted={!!post.viewer?.repost}
273
275
repostCount={
274
-
!disableRepostsMetrics
275
-
? (post.repostCount ?? 0) + (post.quoteCount ?? 0)
276
-
: 0
276
+
(!disableRepostsMetrics ? (post.repostCount ?? 0) : 0) +
277
+
(!disableQuotesMetrics ? (post.quoteCount ?? 0) : 0)
277
278
}
278
279
onRepost={onRepost}
279
280
onQuote={onQuote}
History
1 round
0 comments
daniela.lol
submitted
#0
1 commit
expand
collapse
fix metrics logic for reposts and quotes on timeline
expand 0 comments
pull request successfully merged