Reorganize custom-feed state models and add the missing _reactKey attribute
This commit is contained in:
parent
a2b089d315
commit
b672006f7e
12 changed files with 44 additions and 38 deletions
|
@ -26,7 +26,7 @@ import DraggableFlatList, {
|
|||
} from 'react-native-draggable-flatlist'
|
||||
import {SavedFeedItem} from 'view/com/algos/SavedFeedItem'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import {AlgoItemModel} from 'state/models/feeds/algo/algo-item'
|
||||
import {CustomFeedModel} from 'state/models/feeds/custom-feed'
|
||||
|
||||
type Props = NativeStackScreenProps<CommonNavigatorParams, 'PinnedFeeds'>
|
||||
|
||||
|
@ -101,7 +101,7 @@ export const PinnedFeeds = withAuthRequired(
|
|||
)
|
||||
|
||||
const PinnedItem = observer(
|
||||
({item, drag}: {item: AlgoItemModel; drag: () => void}) => {
|
||||
({item, drag}: {item: CustomFeedModel; drag: () => void}) => {
|
||||
const pal = usePalette('default')
|
||||
const rootStore = useStores()
|
||||
const savedFeeds = useMemo(() => rootStore.me.savedFeeds, [rootStore])
|
||||
|
|
|
@ -26,7 +26,7 @@ import {s, colors} from 'lib/styles'
|
|||
import {useAnalytics} from 'lib/analytics'
|
||||
import {ComposeIcon2} from 'lib/icons'
|
||||
import AlgoItem from 'view/com/algos/AlgoItem'
|
||||
import {AlgoItemModel} from 'state/models/feeds/algo/algo-item'
|
||||
import {CustomFeedModel} from 'state/models/feeds/custom-feed'
|
||||
import {useSetTitle} from 'lib/hooks/useSetTitle'
|
||||
import {combinedDisplayName} from 'lib/strings/display-names'
|
||||
|
||||
|
@ -188,7 +188,7 @@ export const ProfileScreen = withAuthRequired(
|
|||
return (
|
||||
<FeedSlice slice={item} ignoreMuteFor={uiState.profile.did} />
|
||||
)
|
||||
} else if (item instanceof AlgoItemModel) {
|
||||
} else if (item instanceof CustomFeedModel) {
|
||||
return <AlgoItem item={item} />
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ import {CenteredView} from 'view/com/util/Views'
|
|||
import {Text} from 'view/com/util/text/Text'
|
||||
import {isDesktopWeb, isWeb} from 'platform/detection'
|
||||
import {s} from 'lib/styles'
|
||||
import {SavedFeedsModel} from 'state/models/feeds/algo/saved'
|
||||
import {SavedFeedsModel} from 'state/models/ui/saved-feeds'
|
||||
import {Link} from 'view/com/util/Link'
|
||||
import {UserAvatar} from 'view/com/util/UserAvatar'
|
||||
import {SavedFeedItem} from 'view/com/algos/SavedFeedItem'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue