Android Compose PagingData Data update
fun getPost() = viewModelScope.launch { _getPostLoading.value = true _postDataList.value = PagingData.empty() Pager( config = PagingConfig( pageSize = POST_SIZE, enablePlaceholders = true ), pagingSourceFactory = { PostPagingSource(postRepository, tokenManager) } ).flow.cachedIn(viewModelScope).collectLatest { _postDataList.value = it _getPostLoading.value = false } } Is it possible to change the value received after paging? For example, if you click Like on […]
paging3 pagingdata insertHeaderItem method cannot insert multiple pieces of data
Like the following, I add multiple elements to the headerList when needed, and refresh, and the headerList will display as many elements as there are.