Skip to content

Commit

Permalink
allow users to like their own messages
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipthelen committed Jan 22, 2024
1 parent 28bd6a5 commit 723412b
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,7 @@ class ChatRecyclerMessageViewHolder(
}
binding.likeBackgroundLayout.setOnClickListener {
chatMessage?.let {
if (it.uuid != userId) {
onLikeMessage?.invoke(it)
} else {
(context as? SnackbarActivity)?.showSnackbar(
content = context.getString(R.string.cant_like_own_message),
displayType = HabiticaSnackbar.SnackbarDisplayType.FAILURE
)
}
onLikeMessage?.invoke(it)
}
}
binding.messageText.setOnClickListener { onShouldExpand?.invoke() }
Expand Down

0 comments on commit 723412b

Please sign in to comment.