diff options
author | Hailey <me@haileyok.com> | 2024-04-12 10:00:44 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 18:00:44 +0100 |
commit | eb2fd53340005316af007afc8af899ba11929098 (patch) | |
tree | 614d459de301b42adad2e8597fd4791ebde567b0 /src/state/queries/post-thread.ts | |
parent | 7047755c509716a6ab1d63ffef24dd9540a88915 (diff) | |
download | voidsky-eb2fd53340005316af007afc8af899ba11929098.tar.zst |
QT Jump Pt. 2 - Remove code duplication (#3506)
* remove code duplication * now it's safe to remove shimmer
Diffstat (limited to 'src/state/queries/post-thread.ts')
-rw-r--r-- | src/state/queries/post-thread.ts | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/state/queries/post-thread.ts b/src/state/queries/post-thread.ts index 832794bf5..dfc568b7d 100644 --- a/src/state/queries/post-thread.ts +++ b/src/state/queries/post-thread.ts @@ -11,7 +11,7 @@ import {getAgent} from '#/state/session' import {findAllPostsInQueryData as findAllPostsInNotifsQueryData} from './notifications/feed' import {findAllPostsInQueryData as findAllPostsInFeedQueryData} from './post-feed' import {precacheThreadPostProfiles} from './profile' -import {getEmbeddedPost} from './util' +import {embedViewRecordToPostView, getEmbeddedPost} from './util' const RQKEY_ROOT = 'post-thread' export const RQKEY = (uri: string) => [RQKEY_ROOT, uri] @@ -332,14 +332,7 @@ function embedViewRecordToPlaceholderThread( type: 'post', _reactKey: record.uri, uri: record.uri, - post: { - uri: record.uri, - cid: record.cid, - author: record.author, - record: record.value, - indexedAt: record.indexedAt, - labels: record.labels, - }, + post: embedViewRecordToPostView(record), record: record.value as AppBskyFeedPost.Record, // validated in getEmbeddedPost parent: undefined, replies: undefined, |