Fix notification descriptions and render images for your own posts in notifs

This commit is contained in:
Paul Frazee 2023-01-17 12:12:17 -06:00
parent b9778b7943
commit ee8d311795
3 changed files with 63 additions and 13 deletions

View file

@ -0,0 +1,39 @@
import React from 'react'
import {
Image,
StyleProp,
StyleSheet,
TouchableWithoutFeedback,
View,
ViewStyle,
} from 'react-native'
export function ImageHorzList({
uris,
onPress,
style,
}: {
uris: string[]
onPress?: (index: number) => void
style?: StyleProp<ViewStyle>
}) {
return (
<View style={[styles.flexRow, style]}>
{uris.map((uri, i) => (
<TouchableWithoutFeedback key={i} onPress={() => onPress?.(i)}>
<Image source={{uri}} style={styles.image} />
</TouchableWithoutFeedback>
))}
</View>
)
}
const styles = StyleSheet.create({
flexRow: {flexDirection: 'row'},
image: {
width: 100,
height: 100,
borderRadius: 4,
marginRight: 5,
},
})

View file

@ -24,7 +24,7 @@ export function ImageLayoutGrid({
style,
}: {
type: ImageLayoutGridType
uris: string
uris: string[]
onPress?: (index: number) => void
style?: StyleProp<ViewStyle>
}) {
@ -58,7 +58,7 @@ function ImageLayoutGridInner({
containerInfo,
}: {
type: ImageLayoutGridType
uris: string
uris: string[]
onPress?: (index: number) => void
containerInfo: Dim
}) {