Dont show save button in embed cards
parent
fb03bbf288
commit
4e56d24a9d
|
@ -24,11 +24,13 @@ export const CustomFeed = observer(
|
|||
({
|
||||
item,
|
||||
style,
|
||||
showSaveBtn = false,
|
||||
showLikes = false,
|
||||
reloadOnFocus = false,
|
||||
}: {
|
||||
item: CustomFeedModel
|
||||
style?: StyleProp<ViewStyle>
|
||||
showSaveBtn?: boolean
|
||||
showLikes?: boolean
|
||||
reloadOnFocus?: boolean
|
||||
}) => {
|
||||
|
@ -66,8 +68,8 @@ export const CustomFeed = observer(
|
|||
<Text style={[pal.text, s.bold]}>
|
||||
{item.data.displayName ?? 'Feed name'}
|
||||
</Text>
|
||||
<Text style={[pal.textLight]}>by @{item.data.creator.handle}</Text>
|
||||
</View>
|
||||
{showSaveBtn && (
|
||||
<View>
|
||||
<Button
|
||||
type={item.isSaved ? 'default' : 'inverted'}
|
||||
|
@ -81,6 +83,7 @@ export const CustomFeed = observer(
|
|||
label={item.data.viewer?.saved ? 'Unsave' : 'Save'}
|
||||
/>
|
||||
</View>
|
||||
)}
|
||||
</View>
|
||||
|
||||
{item.data.description ? (
|
||||
|
|
|
@ -19,7 +19,12 @@ export const SavedFeedItem = observer(
|
|||
|
||||
return (
|
||||
<View style={styles.itemContainer}>
|
||||
<CustomFeed key={item.data.uri} item={item} style={styles.item} />
|
||||
<CustomFeed
|
||||
key={item.data.uri}
|
||||
item={item}
|
||||
style={styles.item}
|
||||
showSaveBtn
|
||||
/>
|
||||
<TouchableOpacity
|
||||
accessibilityRole="button"
|
||||
onPress={() => {
|
||||
|
|
|
@ -189,7 +189,7 @@ export const ProfileScreen = withAuthRequired(
|
|||
<FeedSlice slice={item} ignoreMuteFor={uiState.profile.did} />
|
||||
)
|
||||
} else if (item instanceof CustomFeedModel) {
|
||||
return <CustomFeed item={item} showLikes />
|
||||
return <CustomFeed item={item} showSaveBtn showLikes />
|
||||
}
|
||||
}
|
||||
return <View />
|
||||
|
|
Loading…
Reference in New Issue