diff options
author | Paul Frazee <pfrazee@gmail.com> | 2022-12-06 13:47:52 -0600 |
---|---|---|
committer | Paul Frazee <pfrazee@gmail.com> | 2022-12-06 13:47:52 -0600 |
commit | ae522c86fe41c1449fe28972eeb45be6074ef227 (patch) | |
tree | 45f104251fa36af6caa5b8bd903c84625f528938 /src/state/models | |
parent | 1a11c13fce6818b54ee251f7fe9870907a7c9aea (diff) | |
download | voidsky-ae522c86fe41c1449fe28972eeb45be6074ef227.tar.zst |
Fix mention-creation and implement mentions in notifications
Diffstat (limited to 'src/state/models')
-rw-r--r-- | src/state/models/notifications-view.ts | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/state/models/notifications-view.ts b/src/state/models/notifications-view.ts index f820c71b7..808b7dee4 100644 --- a/src/state/models/notifications-view.ts +++ b/src/state/models/notifications-view.ts @@ -81,6 +81,10 @@ export class NotificationsViewItemModel implements GroupedNotification { return this.reason === 'trend' } + get isMention() { + return this.reason === 'mention' + } + get isReply() { return this.reason === 'reply' } @@ -94,7 +98,13 @@ export class NotificationsViewItemModel implements GroupedNotification { } get needsAdditionalData() { - if (this.isUpvote || this.isRepost || this.isTrend || this.isReply) { + if ( + this.isUpvote || + this.isRepost || + this.isTrend || + this.isReply || + this.isMention + ) { return !this.additionalPost } return false @@ -124,7 +134,7 @@ export class NotificationsViewItemModel implements GroupedNotification { return } let postUri - if (this.isReply) { + if (this.isReply || this.isMention) { postUri = this.uri } else if (this.isUpvote || this.isRead || this.isTrend) { postUri = this.subjectUri |