mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-11-23 15:47:20 +00:00
Show newest live chat messages on top
This commit is contained in:
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) {
|
||||
|
||||
Reference in new issue
Block a user