Bluesky app fork with some witchin' additions 💫
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Indicate images in notifications

+12 -3
+12 -3
src/view/com/notifications/FeedItem.tsx
··· 1 1 import React, {useMemo} from 'react' 2 2 import {observer} from 'mobx-react-lite' 3 3 import {StyleSheet, View} from 'react-native' 4 + import {AppBskyEmbedImages} from '@atproto/api' 4 5 import {AtUri} from '../../../third-party/uri' 5 6 import {FontAwesomeIcon, Props} from '@fortawesome/react-native-fontawesome' 6 7 import {NotificationsViewItemModel} from '../../../state/models/notifications-view' ··· 227 228 if (additionalPost.error) { 228 229 return <ErrorMessage message={additionalPost.error} /> 229 230 } 230 - return ( 231 - <Text style={pal.textLight}>{additionalPost.thread?.postRecord.text}</Text> 232 - ) 231 + const record = additionalPost.thread?.postRecord 232 + let text = record.text 233 + if ( 234 + AppBskyEmbedImages.isMain(record.embed) && 235 + AppBskyEmbedImages.validateMain(record.embed).success 236 + ) { 237 + for (let i = 0; i < record.embed.images.length; i++) { 238 + text += ` [${record.embed.images[i].alt || `image${i + 1}`}]` 239 + } 240 + } 241 + return <Text style={pal.textLight}>{text}</Text> 233 242 } 234 243 235 244 const styles = StyleSheet.create({