diff --git a/app/src/main/java/com/github/libretube/api/obj/Comment.kt b/app/src/main/java/com/github/libretube/api/obj/Comment.kt index 37a8fad04..60ac52e32 100644 --- a/app/src/main/java/com/github/libretube/api/obj/Comment.kt +++ b/app/src/main/java/com/github/libretube/api/obj/Comment.kt @@ -19,5 +19,6 @@ data class Comment( val thumbnail: String, val verified: Boolean, val replyCount: Long, - val creatorReplied: Boolean = false + val creatorReplied: Boolean = false, + val channelOwner: Boolean = false ) : Parcelable diff --git a/app/src/main/java/com/github/libretube/ui/adapters/CommentsAdapter.kt b/app/src/main/java/com/github/libretube/ui/adapters/CommentsAdapter.kt index 522d135a3..844738bcc 100644 --- a/app/src/main/java/com/github/libretube/ui/adapters/CommentsAdapter.kt +++ b/app/src/main/java/com/github/libretube/ui/adapters/CommentsAdapter.kt @@ -72,7 +72,11 @@ class CommentsAdapter( override fun onBindViewHolder(holder: CommentsViewHolder, position: Int) { val comment = comments[position] holder.binding.apply { - commentInfos.text = comment.author + TextUtils.SEPARATOR + comment.commentedTime + commentAuthor.text = comment.author + if (comment.channelOwner) { + commentAuthor.setBackgroundResource(R.drawable.comment_channel_owner_bg) + } + commentInfos.text = TextUtils.SEPARATOR + comment.commentedTime commentText.movementMethod = LinkMovementMethodCompat.getInstance() commentText.text = comment.commentText?.replace("", " ") diff --git a/app/src/main/java/com/github/libretube/util/PlayingQueue.kt b/app/src/main/java/com/github/libretube/util/PlayingQueue.kt index 3b39ccaa9..c8758a36d 100644 --- a/app/src/main/java/com/github/libretube/util/PlayingQueue.kt +++ b/app/src/main/java/com/github/libretube/util/PlayingQueue.kt @@ -203,7 +203,12 @@ object PlayingQueue { } } - fun updateQueue(streamItem: StreamItem, playlistId: String?, channelId: String?, relatedStreams: List = emptyList()) { + fun updateQueue( + streamItem: StreamItem, + playlistId: String?, + channelId: String?, + relatedStreams: List = emptyList() + ) { if (playlistId != null) { insertPlaylist(playlistId, streamItem) } else if (channelId != null) { diff --git a/app/src/main/res/drawable/comment_channel_owner_bg.xml b/app/src/main/res/drawable/comment_channel_owner_bg.xml new file mode 100644 index 000000000..d2f581fd2 --- /dev/null +++ b/app/src/main/res/drawable/comment_channel_owner_bg.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/comments_row.xml b/app/src/main/res/layout/comments_row.xml index b7eef22e4..0b9f1442a 100644 --- a/app/src/main/res/layout/comments_row.xml +++ b/app/src/main/res/layout/comments_row.xml @@ -36,6 +36,17 @@ android:gravity="center_vertical" android:orientation="horizontal"> + + + tools:text="• 10h" />