Fix notification descriptions and render images for your own posts in notifs
This commit is contained in:
parent
b9778b7943
commit
ee8d311795
3 changed files with 63 additions and 13 deletions
39
src/view/com/util/images/ImageHorzList.tsx
Normal file
39
src/view/com/util/images/ImageHorzList.tsx
Normal 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,
|
||||
},
|
||||
})
|
|
@ -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
|
||||
}) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue