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/profile.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/profile.ts')
-rw-r--r-- | src/state/queries/profile.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/state/queries/profile.ts b/src/state/queries/profile.ts index af00faf27..d9a2c6bbb 100644 --- a/src/state/queries/profile.ts +++ b/src/state/queries/profile.ts @@ -23,6 +23,7 @@ import {logEvent, LogEvents, toClout} from '#/lib/statsig/statsig' import {Shadow} from '#/state/cache/types' import {STALE} from '#/state/queries' import {resetProfilePostsQueries} from '#/state/queries/post-feed' +import * as userActionHistory from '#/state/userActionHistory' import {updateProfileShadow} from '../cache/profile-shadow' import {useAgent, useSession} from '../session' import { @@ -233,6 +234,7 @@ export function useProfileFollowMutationQueue( const {uri} = await followMutation.mutateAsync({ did, }) + userActionHistory.follow([did]) return uri } else { if (prevFollowingUri) { @@ -240,6 +242,7 @@ export function useProfileFollowMutationQueue( did, followUri: prevFollowingUri, }) + userActionHistory.unfollow([did]) } return undefined } |