diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-09-27 22:50:32 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-28 00:50:32 +0300 |
commit | 4b5d6e6efb09a714d82e2093dec39c85400a2de6 (patch) | |
tree | 981d0e08b30549234e02be49dbb190e55740556f /src/state/cache | |
parent | f68b15219fd02e23d965015201400138ed69d59d (diff) | |
download | voidsky-4b5d6e6efb09a714d82e2093dec39c85400a2de6.tar.zst |
Pinned posts (#5055)
* add to dropdown menu * use normal profile mutation hook * add pin as reason * request pins * shadow update * rm logs * get prev pinned from getProfile * fix toasts * invalidate after appview ready * don't mutate params * rm log * use checkCommited rather than manual whenAppViewReady * move to mutation * even more optimistic optimistic update * allow pins in `posts_and_author_threads` * update @atproto/api * add reasonPin type * fix strange type error in unrelated query * another missing type
Diffstat (limited to 'src/state/cache')
-rw-r--r-- | src/state/cache/post-shadow.ts | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/state/cache/post-shadow.ts b/src/state/cache/post-shadow.ts index 65300a8ef..b456a76d9 100644 --- a/src/state/cache/post-shadow.ts +++ b/src/state/cache/post-shadow.ts @@ -21,6 +21,7 @@ export interface PostShadow { repostUri: string | undefined isDeleted: boolean embed: AppBskyEmbedRecord.View | AppBskyEmbedRecordWithMedia.View | undefined + pinned: boolean } export const POST_TOMBSTONE = Symbol('PostTombstone') @@ -113,6 +114,7 @@ function mergeShadow( ...(post.viewer || {}), like: 'likeUri' in shadow ? shadow.likeUri : post.viewer?.like, repost: 'repostUri' in shadow ? shadow.repostUri : post.viewer?.repost, + pinned: 'pinned' in shadow ? shadow.pinned : post.viewer?.pinned, }, }) } |