fix: improve toot edited notification (#2303)

This commit is contained in:
Scott Feeney 2022-12-10 10:56:12 -08:00 committed by GitHub
parent 4a6907bbdc
commit 3c32b48e29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 1 deletions

View File

@ -511,6 +511,7 @@ export default {
rebloggedYou: 'boosted your toot', rebloggedYou: 'boosted your toot',
favoritedYou: 'favorited your toot', favoritedYou: 'favorited your toot',
followedYou: 'followed you', followedYou: 'followed you',
edited: 'edited their toot',
signedUp: 'signed up', signedUp: 'signed up',
posted: 'posted', posted: 'posted',
pollYouCreatedEnded: 'A poll you created has ended', pollYouCreatedEnded: 'A poll you created has ended',
@ -526,6 +527,7 @@ export default {
// Accessible status labels // Accessible status labels
accountRebloggedYou: '{account} boosted your toot', accountRebloggedYou: '{account} boosted your toot',
accountFavoritedYou: '{account} favorited your toot', accountFavoritedYou: '{account} favorited your toot',
accountEdited: '{account} edited their toot',
rebloggedByAccount: 'Boosted by {account}', rebloggedByAccount: 'Boosted by {account}',
contentWarningContent: 'Content warning: {spoiler}', contentWarningContent: 'Content warning: {spoiler}',
hasMedia: 'has media', hasMedia: 'has media',

View File

@ -11,6 +11,8 @@ function getNotificationText (notification, omitEmojiInDisplayNames) {
return formatIntl('intl.accountRebloggedYou', { account: notificationAccountDisplayName }) return formatIntl('intl.accountRebloggedYou', { account: notificationAccountDisplayName })
} else if (notification.type === 'favourite') { } else if (notification.type === 'favourite') {
return formatIntl('intl.accountFavoritedYou', { account: notificationAccountDisplayName }) return formatIntl('intl.accountFavoritedYou', { account: notificationAccountDisplayName })
} else if (notification.type === 'update') {
return formatIntl('intl.accountEdited', { account: notificationAccountDisplayName })
} }
} }

View File

@ -309,7 +309,7 @@
) )
), ),
showHeader: ({ notification, status, timelineType }) => ( showHeader: ({ notification, status, timelineType }) => (
(notification && ['reblog', 'favourite', 'poll', 'status'].includes(notification.type)) || (notification && ['reblog', 'favourite', 'poll', 'status', 'update'].includes(notification.type)) ||
status.reblog || status.reblog ||
timelineType === 'pinned' timelineType === 'pinned'
), ),

View File

@ -137,6 +137,8 @@
return '#fa-comment' return '#fa-comment'
} else if (notificationType === 'admin.sign_up') { } else if (notificationType === 'admin.sign_up') {
return '#fa-user-plus' return '#fa-user-plus'
} else if (notificationType === 'update') {
return '#fa-pencil'
} }
return '#fa-star' return '#fa-star'
}, },
@ -159,6 +161,8 @@
} }
} else if (status && status.reblog) { } else if (status && status.reblog) {
return 'intl.reblogged' return 'intl.reblogged'
} else if (notificationType === 'update') {
return 'intl.edited'
} else { } else {
return '' return ''
} }