diff options
author | Eric Bailey <git@esb.lol> | 2024-07-04 16:28:38 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-04 22:28:38 +0100 |
commit | 3407206f52a03223b9eba925f030cf371833a8ed (patch) | |
tree | 33060612a4a5b23232d85b966906ad7f0a1ba35d /src/state/queries/post.ts | |
parent | 1c6bfc02fb9da56281bdc449a951725fb2ec808d (diff) | |
download | voidsky-3407206f52a03223b9eba925f030cf371833a8ed.tar.zst |
[D1X] Use user action and viewing history to inform suggested follows (#4727)
* Use user action and viewing history to inform suggested follows * Remove dynamic spreads * Track more info about seen posts * Add ranking --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
Diffstat (limited to 'src/state/queries/post.ts')
-rw-r--r-- | src/state/queries/post.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/state/queries/post.ts b/src/state/queries/post.ts index a511d6b3d..071a2e91f 100644 --- a/src/state/queries/post.ts +++ b/src/state/queries/post.ts @@ -8,6 +8,7 @@ import {logEvent, LogEvents, toClout} from '#/lib/statsig/statsig' import {updatePostShadow} from '#/state/cache/post-shadow' import {Shadow} from '#/state/cache/types' import {useAgent, useSession} from '#/state/session' +import * as userActionHistory from '#/state/userActionHistory' import {useIsThreadMuted, useSetThreadMute} from '../cache/thread-mutes' import {findProfileQueryData} from './profile' @@ -92,6 +93,7 @@ export function usePostLikeMutationQueue( uri: postUri, cid: postCid, }) + userActionHistory.like([postUri]) return likeUri } else { if (prevLikeUri) { @@ -99,6 +101,7 @@ export function usePostLikeMutationQueue( postUri: postUri, likeUri: prevLikeUri, }) + userActionHistory.unlike([postUri]) } return undefined } |