QT Jump Pt. 2 - Remove code duplication (#3506)
* remove code duplication * now it's safe to remove shimmer
This commit is contained in:
parent
7047755c50
commit
eb2fd53340
2 changed files with 36 additions and 49 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue