Reorganize state models for clarity (#378)
This commit is contained in:
parent
9652d994dd
commit
2045c615a8
44 changed files with 163 additions and 171 deletions
|
@ -2,7 +2,7 @@ import React, {MutableRefObject} from 'react'
|
|||
import {observer} from 'mobx-react-lite'
|
||||
import {CenteredView, FlatList} from '../util/Views'
|
||||
import {ActivityIndicator, RefreshControl, StyleSheet, View} from 'react-native'
|
||||
import {NotificationsViewModel} from 'state/models/notifications-view'
|
||||
import {NotificationsFeedModel} from 'state/models/feeds/notifications'
|
||||
import {FeedItem} from './FeedItem'
|
||||
import {NotificationFeedLoadingPlaceholder} from '../util/LoadingPlaceholder'
|
||||
import {ErrorMessage} from '../util/error/ErrorMessage'
|
||||
|
@ -19,7 +19,7 @@ export const Feed = observer(function Feed({
|
|||
onPressTryAgain,
|
||||
onScroll,
|
||||
}: {
|
||||
view: NotificationsViewModel
|
||||
view: NotificationsFeedModel
|
||||
scrollElRef?: MutableRefObject<FlatList<any> | null>
|
||||
onPressTryAgain?: () => void
|
||||
onScroll?: OnScrollCb
|
||||
|
|
|
@ -14,8 +14,8 @@ import {
|
|||
FontAwesomeIconStyle,
|
||||
Props,
|
||||
} from '@fortawesome/react-native-fontawesome'
|
||||
import {NotificationsViewItemModel} from 'state/models/notifications-view'
|
||||
import {PostThreadViewModel} from 'state/models/post-thread-view'
|
||||
import {NotificationsFeedItemModel} from 'state/models/feeds/notifications'
|
||||
import {PostThreadModel} from 'state/models/content/post-thread'
|
||||
import {s, colors} from 'lib/styles'
|
||||
import {ago} from 'lib/strings/time'
|
||||
import {pluralize} from 'lib/strings/helpers'
|
||||
|
@ -42,7 +42,7 @@ interface Author {
|
|||
export const FeedItem = observer(function FeedItem({
|
||||
item,
|
||||
}: {
|
||||
item: NotificationsViewItemModel
|
||||
item: NotificationsFeedItemModel
|
||||
}) {
|
||||
const pal = usePalette('default')
|
||||
const [isAuthorsExpanded, setAuthorsExpanded] = React.useState<boolean>(false)
|
||||
|
@ -338,7 +338,7 @@ function ExpandedAuthorsList({
|
|||
function AdditionalPostText({
|
||||
additionalPost,
|
||||
}: {
|
||||
additionalPost?: PostThreadViewModel
|
||||
additionalPost?: PostThreadModel
|
||||
}) {
|
||||
const pal = usePalette('default')
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue