tangled
alpha
login
or
join now
daniela.lol
/
witchsky.app
forked from
jollywhoppers.com/witchsky.app
0
fork
atom
Bluesky app fork with some witchin' additions 💫
0
fork
atom
overview
issues
pulls
pipelines
fix metrics logic for reposts and quotes on timeline
daniela.lol
1 month ago
86aa97e3
0b742059
verified
This commit was signed with the committer's
known signature
.
daniela.lol
SSH Key Fingerprint:
SHA256:hDZNP/SivA4B+nXJfcGRZnWjV0crLCjKVF2oVJiZcUI=
+4
-3
1 changed file
expand all
collapse all
unified
split
src
components
PostControls
index.tsx
+4
-3
src/components/PostControls/index.tsx
reviewed
···
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
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
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
274
-
!disableRepostsMetrics
275
275
-
? (post.repostCount ?? 0) + (post.quoteCount ?? 0)
276
276
-
: 0
276
276
+
(!disableRepostsMetrics ? (post.repostCount ?? 0) : 0) +
277
277
+
(!disableQuotesMetrics ? (post.quoteCount ?? 0) : 0)
277
278
}
278
279
onRepost={onRepost}
279
280
onQuote={onQuote}