Make notifications clickable
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import {
|
import {
|
||||||
AppBskyFeedDefs,
|
type AppBskyFeedDefs,
|
||||||
AppBskyGraphDefs,
|
type AppBskyGraphDefs,
|
||||||
AppBskyNotificationListNotifications,
|
type AppBskyNotificationListNotifications,
|
||||||
} from '@atproto/api'
|
} from '@atproto/api'
|
||||||
|
|
||||||
export type NotificationType =
|
export type NotificationType =
|
||||||
@@ -44,6 +44,8 @@ type OtherNotificationType =
|
|||||||
| 'quote'
|
| 'quote'
|
||||||
| 'follow'
|
| 'follow'
|
||||||
| 'feedgen-like'
|
| 'feedgen-like'
|
||||||
|
| 'verified'
|
||||||
|
| 'unverified'
|
||||||
| 'unknown'
|
| 'unknown'
|
||||||
|
|
||||||
type FeedNotificationBase = {
|
type FeedNotificationBase = {
|
||||||
|
|||||||
@@ -102,7 +102,11 @@ let NotificationFeedItem = ({
|
|||||||
const urip = new AtUri(item.subjectUri)
|
const urip = new AtUri(item.subjectUri)
|
||||||
return `/profile/${urip.host}/post/${urip.rkey}`
|
return `/profile/${urip.host}/post/${urip.rkey}`
|
||||||
}
|
}
|
||||||
} else if (item.type === 'follow') {
|
} else if (
|
||||||
|
item.type === 'follow' ||
|
||||||
|
item.type === 'verified' ||
|
||||||
|
item.type === 'unverified'
|
||||||
|
) {
|
||||||
return makeProfileLink(item.notification.author)
|
return makeProfileLink(item.notification.author)
|
||||||
} else if (item.type === 'reply') {
|
} else if (item.type === 'reply') {
|
||||||
const urip = new AtUri(item.notification.uri)
|
const urip = new AtUri(item.notification.uri)
|
||||||
@@ -390,7 +394,6 @@ let NotificationFeedItem = ({
|
|||||||
<StarterPack width={30} gradient="sky" />
|
<StarterPack width={30} gradient="sky" />
|
||||||
</View>
|
</View>
|
||||||
)
|
)
|
||||||
// @ts-ignore TODO
|
|
||||||
} else if (item.type === 'verified') {
|
} else if (item.type === 'verified') {
|
||||||
a11yLabel = hasMultipleAuthors
|
a11yLabel = hasMultipleAuthors
|
||||||
? _(
|
? _(
|
||||||
@@ -416,7 +419,6 @@ let NotificationFeedItem = ({
|
|||||||
<Trans>{firstAuthorLink} verified you</Trans>
|
<Trans>{firstAuthorLink} verified you</Trans>
|
||||||
)
|
)
|
||||||
icon = <VerifiedCheck size="xl" />
|
icon = <VerifiedCheck size="xl" />
|
||||||
// @ts-ignore TODO
|
|
||||||
} else if (item.type === 'unverified') {
|
} else if (item.type === 'unverified') {
|
||||||
a11yLabel = hasMultipleAuthors
|
a11yLabel = hasMultipleAuthors
|
||||||
? _(
|
? _(
|
||||||
|
|||||||
Reference in New Issue
Block a user