NotificationsAdapter: Show Emoji Reaction notifications

Based on these commits by a1ba:
- a109089f7b
- d6e7853ddf
This commit is contained in:
fruye 2022-11-13 11:27:09 +01:00
parent d576294a91
commit c708451dc4
3 changed files with 8 additions and 1 deletions

View File

@ -59,6 +59,7 @@ enum class NotificationViewKind {
Notification.Type.FAVOURITE,
Notification.Type.REBLOG,
Notification.Type.STATUS,
Notification.Type.EMOJI_REACTION,
Notification.Type.UPDATE -> NOTIFICATION
Notification.Type.FOLLOW,
Notification.Type.SIGN_UP -> FOLLOW

View File

@ -264,6 +264,11 @@ internal class StatusNotificationViewHolder(
icon = getIconWithColor(context, R.drawable.ic_edit_24dp, R.color.tusky_blue)
format = context.getString(R.string.notification_update_format)
}
Notification.Type.EMOJI_REACTION -> {
icon = getIconWithColor(context, R.drawable.ic_emoji_24dp, R.color.tusky_green)
// User string gets replaced later.
format = context.getString(R.string.notification_emoji_format, "%s", notificationViewData.emoji)
}
else -> {
icon = getIconWithColor(context, R.drawable.ic_star_24dp, R.color.tusky_orange)
format = context.getString(R.string.notification_favourite_format)

View File

@ -10,6 +10,7 @@
<string name="action_emoji_unreact">Remove reaction</string>
<string name="action_emoji_reacted_by">Who reacted</string>
<string name="title_emoji_reacted_by">%s reacted by</string>
<string name="notification_emoji_format">%s reacted with %s to your post</string>
<string name="notification_emoji_name">Emoji Reactions</string>
</resources>
</resources>