about summary refs log tree commit diff
path: root/src/state/models/feeds/notifications.ts
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/state/models/feeds/notifications.ts
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/state/models/feeds/notifications.ts')
-rw-r--r--src/state/models/feeds/notifications.ts8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/state/models/feeds/notifications.ts b/src/state/models/feeds/notifications.ts
index 5005f1d91..05e2ef0db 100644
--- a/src/state/models/feeds/notifications.ts
+++ b/src/state/models/feeds/notifications.ts
@@ -145,7 +145,7 @@ export class NotificationsFeedItemModel {
   }
 
   get isLike() {
-    return this.reason === 'like'
+    return this.reason === 'like' && !this.isCustomFeedLike // the reason property for custom feed likes is also 'like'
   }
 
   get isRepost() {
@@ -168,6 +168,12 @@ export class NotificationsFeedItemModel {
     return this.reason === 'follow'
   }
 
+  get isCustomFeedLike() {
+    return (
+      this.reason === 'like' && this.reasonSubject?.includes('feed.generator')
+    )
+  }
+
   get needsAdditionalData() {
     if (
       this.isLike ||