[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>
This commit is contained in:
Eric Bailey 2024-07-04 16:28:38 -05:00 committed by GitHub
parent 1c6bfc02fb
commit 3407206f52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 196 additions and 49 deletions

View file

@ -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
}