about summary refs log tree commit diff
path: root/src/view/com/notifications/FeedItem.tsx
diff options
context:
space:
mode:
authorAnsh <anshnanda10@gmail.com>2023-07-05 17:56:26 -0700
committerGitHub <noreply@github.com>2023-07-05 19:56:26 -0500
commitfe327300256a81adf261a7c8e9537b86feb0fd71 (patch)
tree89cda0edb1590d000e2322ce9506f586d2de9679 /src/view/com/notifications/FeedItem.tsx
parent99aa38e3ca319f5c58d7543d6f5236882dbc0708 (diff)
downloadvoidsky-fe327300256a81adf261a7c8e9537b86feb0fd71.tar.zst
[APP-702] Render Custom Feed likes properly (#980)
* render href for custom feed likes properly

* fix custom feed text in push notification

* fix custom feed accessibility title

* fix lint
Diffstat (limited to 'src/view/com/notifications/FeedItem.tsx')
-rw-r--r--src/view/com/notifications/FeedItem.tsx12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/view/com/notifications/FeedItem.tsx b/src/view/com/notifications/FeedItem.tsx
index 7994c53ab..6c03d7f98 100644
--- a/src/view/com/notifications/FeedItem.tsx
+++ b/src/view/com/notifications/FeedItem.tsx
@@ -65,6 +65,9 @@ export const FeedItem = observer(function ({
     } else if (item.isReply) {
       const urip = new AtUri(item.uri)
       return `/profile/${urip.host}/post/${urip.rkey}`
+    } else if (item.isCustomFeedLike) {
+      const urip = new AtUri(item.subjectUri)
+      return `/profile/${urip.host}/feed/${urip.rkey}`
     }
     return ''
   }, [item])
@@ -75,6 +78,8 @@ export const FeedItem = observer(function ({
       return item.author.handle
     } else if (item.isReply) {
       return 'Post'
+    } else if (item.isCustomFeedLike) {
+      return 'Custom Feed'
     }
   }, [item])
 
@@ -160,6 +165,13 @@ export const FeedItem = observer(function ({
     action = 'followed you'
     icon = 'user-plus'
     iconStyle = [s.blue3 as FontAwesomeIconStyle]
+  } else if (item.isCustomFeedLike) {
+    action = `liked your custom feed '${new AtUri(item.subjectUri).rkey}'`
+    icon = 'HeartIconSolid'
+    iconStyle = [
+      s.red3 as FontAwesomeIconStyle,
+      {position: 'relative', top: -4},
+    ]
   } else {
     return null
   }