fix(creator): 라이브 더보기 상태 보존을 보정한다

This commit is contained in:
2026-06-17 23:24:39 +09:00
parent e90fb04de9
commit 10004652e4
2 changed files with 94 additions and 4 deletions

View File

@@ -58,8 +58,11 @@ class CreatorChannelLiveViewModel(
val data = response.data
val current = _liveStateLiveData.value as? CreatorChannelLiveUiState.Content ?: content
if (response.success && data != null) {
_liveStateLiveData.value = data.toContentState(
_liveStateLiveData.value = current.copy(
liveReplayContents = current.liveReplayContents + data.liveReplayContents,
page = data.page,
size = data.size,
hasNext = data.hasNext,
isLoadingMore = false
)
} else {
@@ -71,6 +74,13 @@ class CreatorChannelLiveViewModel(
}
}
fun consumePaginationErrorMessage() {
val content = _liveStateLiveData.value as? CreatorChannelLiveUiState.Content ?: return
if (content.paginationErrorMessage == null) return
_liveStateLiveData.value = content.copy(paginationErrorMessage = null)
}
private fun loadFirstPage(sort: ContentSort) {
val generation = ++requestGeneration
_liveStateLiveData.value = CreatorChannelLiveUiState.Loading