Fix some types
parent
2ad0d059ac
commit
41fd6eb95b
|
@ -1,7 +1,7 @@
|
||||||
import {NavigationProp} from '@react-navigation/native'
|
import {NavigationProp} from '@react-navigation/native'
|
||||||
import {State, RouteParams} from './types'
|
import {State, RouteParams} from './types'
|
||||||
|
|
||||||
export function getRootNavigation<T>(
|
export function getRootNavigation<T extends {}>(
|
||||||
nav: NavigationProp<T>,
|
nav: NavigationProp<T>,
|
||||||
): NavigationProp<T> {
|
): NavigationProp<T> {
|
||||||
while (nav.getParent()) {
|
while (nav.getParent()) {
|
||||||
|
|
|
@ -120,7 +120,7 @@ export function* findAllPostsInQueryData(
|
||||||
if (item.subject?.uri === uri) {
|
if (item.subject?.uri === uri) {
|
||||||
yield item.subject
|
yield item.subject
|
||||||
}
|
}
|
||||||
const quotedPost = getEmbeddedPost(item.subject.embed)
|
const quotedPost = getEmbeddedPost(item.subject?.embed)
|
||||||
if (quotedPost?.uri === uri) {
|
if (quotedPost?.uri === uri) {
|
||||||
yield embedViewRecordToPostView(quotedPost)
|
yield embedViewRecordToPostView(quotedPost)
|
||||||
}
|
}
|
||||||
|
|
|
@ -239,7 +239,8 @@ export function* findAllPostsInQueryData(
|
||||||
if (item.uri === uri) {
|
if (item.uri === uri) {
|
||||||
yield item
|
yield item
|
||||||
}
|
}
|
||||||
const quotedPost = getEmbeddedPost(item.post.embed)
|
const quotedPost =
|
||||||
|
item.type === 'post' ? getEmbeddedPost(item.post.embed) : undefined
|
||||||
if (quotedPost?.uri === uri) {
|
if (quotedPost?.uri === uri) {
|
||||||
yield embedViewRecordToPlaceholderThread(quotedPost)
|
yield embedViewRecordToPlaceholderThread(quotedPost)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue