Show newest live chat messages on top

This commit is contained in:
h authored and Tobi committed 2026-11-03 23:04:48 +01:00
1 parent 813b618711
commit 7b43e6fa37
2 files changed
+3 -3

No files matched your search

@@ -77,7 +77,7 @@ private fun CommentSection(
val commentInfo = uiState.data
val count = commentInfo.commentCount
if (commentInfo.isCommentsDisabled) {
if (commentInfo.isCommentsDisabled && !commentInfo.isLiveChat) {
item {
EmptyStateComposable(
spec = EmptyStateSpec.DisabledComments,
@@ -87,7 +87,7 @@ private fun CommentSection(
)
}
} else if (count == 0) {
} else if (count == 0 && !commentInfo.isLiveChat) {
item {
EmptyStateComposable(
spec = EmptyStateSpec.NoComments,
@@ -98,7 +98,7 @@ class CommentsViewModel(savedStateHandle: SavedStateHandle) : ViewModel() {
)
Log.i(TAG, "liveChatPolling: fetched ${result.items.size} items, nextPage=${result.nextPage != null}")
if (result.items.isNotEmpty()) {
_liveChatItems.value = _liveChatItems.value + result.items
_liveChatItems.value = result.items + _liveChatItems.value
}
nextPage = result.nextPage
} catch (e: Exception) {