this repo has no description
0
fork

Configure Feed

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

inline reason

+51 -5
.github/workflows/ci.yml .github/workflows/_ci.yml
+50 -4
apps/expo/src/app/(tabs)/notifications.tsx
··· 14 14 } from "@atproto/api"; 15 15 import { FlashList } from "@shopify/flash-list"; 16 16 import { useInfiniteQuery, useQuery } from "@tanstack/react-query"; 17 - import { Heart, Repeat, UserPlus } from "lucide-react-native"; 17 + import { 18 + AtSign, 19 + Heart, 20 + MessageCircle, 21 + Quote, 22 + Repeat, 23 + UserPlus, 24 + } from "lucide-react-native"; 18 25 19 26 import { Button } from "../../components/button"; 20 27 import { Embed } from "../../components/embed"; ··· 211 218 case "quote": 212 219 case "mention": 213 220 if (!subject) return null; 214 - return <PostNotification uri={subject} unread={!isRead} />; 221 + return ( 222 + <PostNotification reason={reason} uri={subject} unread={!isRead} /> 223 + ); 215 224 default: 216 225 console.warn("Unknown notification reason", reason); 217 226 return null; ··· 275 284 {actors[0].displayName?.trim() ?? actors[0].handle} 276 285 {actors.length > 1 && ` and ${actors.length - 1} others`} 277 286 </Text> 278 - {" " + action + " · " + timeSince(new Date(indexedAt))} 287 + {" " + action} 288 + <Text className="text-neutral-500"> 289 + {" · " + timeSince(new Date(indexedAt))} 290 + </Text> 279 291 </Text> 280 292 </View> 281 293 ); ··· 285 297 uri, 286 298 unread, 287 299 inline, 300 + reason, 288 301 }: { 289 302 uri: string; 290 303 unread: boolean; 291 304 inline?: boolean; 305 + reason?: "mention" | "reply" | "quote" | (string & {}); 292 306 }) => { 293 307 const agent = useAuthedAgent(); 294 308 ··· 335 349 </View> 336 350 ); 337 351 } 338 - return <FeedPost item={post.data} unread={unread} />; 352 + let inlineReason = null; 353 + switch (reason) { 354 + case "mention": 355 + inlineReason = ( 356 + <View className="flex-row items-center"> 357 + <AtSign size={12} color="#737373" /> 358 + <Text className="ml-1 text-neutral-500">mentioned you</Text> 359 + </View> 360 + ); 361 + break; 362 + case "reply": 363 + inlineReason = ( 364 + <View className="flex-row items-center"> 365 + <MessageCircle size={12} color="#737373" /> 366 + <Text className="ml-1 text-neutral-500">replied to you</Text> 367 + </View> 368 + ); 369 + break; 370 + case "quote": 371 + inlineReason = ( 372 + <View className="flex-row items-center"> 373 + <Quote size={12} color="#737373" /> 374 + <Text className="ml-1 text-neutral-500">quoted you</Text> 375 + </View> 376 + ); 377 + } 378 + return ( 379 + <FeedPost 380 + item={post.data} 381 + inlineReason={inlineReason} 382 + unread={unread} 383 + /> 384 + ); 339 385 } 340 386 };
+1 -1
apps/expo/src/components/feed-post.tsx
··· 72 72 </TouchableOpacity> 73 73 </Link> 74 74 </View> 75 - 76 75 {/* right col */} 77 76 <View className="flex-1 pb-2.5 pl-1 pr-2"> 78 77 <Link href={profileHref} asChild> ··· 95 94 {/* text content */} 96 95 <Link href={postHref} asChild> 97 96 <Pressable> 97 + {inlineReason} 98 98 <RichText value={item.post.record.text} /> 99 99 </Pressable> 100 100 </Link>