Reorganize state models for clarity (#378)
This commit is contained in:
parent
9652d994dd
commit
2045c615a8
44 changed files with 163 additions and 171 deletions
|
@ -11,7 +11,7 @@ import {
|
|||
import {FlatList} from '../util/Views'
|
||||
import {PostFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||
import {ErrorMessage} from '../util/error/ErrorMessage'
|
||||
import {FeedModel} from 'state/models/feed-view'
|
||||
import {PostsFeedModel} from 'state/models/feeds/posts'
|
||||
import {FeedSlice} from './FeedSlice'
|
||||
import {OnScrollCb} from 'lib/hooks/useOnMainScroll'
|
||||
import {s} from 'lib/styles'
|
||||
|
@ -33,7 +33,7 @@ export const Feed = observer(function Feed({
|
|||
testID,
|
||||
headerOffset = 0,
|
||||
}: {
|
||||
feed: FeedModel
|
||||
feed: PostsFeedModel
|
||||
style?: StyleProp<ViewStyle>
|
||||
showPostFollowBtn?: boolean
|
||||
scrollElRef?: MutableRefObject<FlatList<any> | null>
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
FontAwesomeIcon,
|
||||
FontAwesomeIconStyle,
|
||||
} from '@fortawesome/react-native-fontawesome'
|
||||
import {FeedItemModel} from 'state/models/feed-view'
|
||||
import {PostsFeedItemModel} from 'state/models/feeds/posts'
|
||||
import {Link, DesktopWebTextLink} from '../util/Link'
|
||||
import {Text} from '../util/text/Text'
|
||||
import {UserInfoText} from '../util/UserInfoText'
|
||||
|
@ -30,7 +30,7 @@ export const FeedItem = observer(function ({
|
|||
showFollowBtn,
|
||||
ignoreMuteFor,
|
||||
}: {
|
||||
item: FeedItemModel
|
||||
item: PostsFeedItemModel
|
||||
isThreadChild?: boolean
|
||||
isThreadParent?: boolean
|
||||
showReplyLine?: boolean
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react'
|
||||
import {StyleSheet, View} from 'react-native'
|
||||
import {FeedSliceModel} from 'state/models/feed-view'
|
||||
import {PostsFeedSliceModel} from 'state/models/feeds/posts'
|
||||
import {AtUri} from '../../../third-party/uri'
|
||||
import {Link} from '../util/Link'
|
||||
import {Text} from '../util/text/Text'
|
||||
|
@ -13,7 +13,7 @@ export function FeedSlice({
|
|||
showFollowBtn,
|
||||
ignoreMuteFor,
|
||||
}: {
|
||||
slice: FeedSliceModel
|
||||
slice: PostsFeedSliceModel
|
||||
showFollowBtn?: boolean
|
||||
ignoreMuteFor?: string
|
||||
}) {
|
||||
|
@ -66,7 +66,7 @@ export function FeedSlice({
|
|||
)
|
||||
}
|
||||
|
||||
function ViewFullThread({slice}: {slice: FeedSliceModel}) {
|
||||
function ViewFullThread({slice}: {slice: PostsFeedSliceModel}) {
|
||||
const pal = usePalette('default')
|
||||
const itemHref = React.useMemo(() => {
|
||||
const urip = new AtUri(slice.rootItem.post.uri)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue