Feature/paging overfetch handling #99
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PULL REQUEST
그룹 생성 이후 페이징 목록이 즉시 갱신되지 않던 문제를 해결하고, 서버가 다음 페이지 유무를 판단하기 위해 추가 데이터를 함께 보내는 방식에 대응하도록 Paging 로직을 개선했습니다.
Description
그룹 생성 후 페이징 목록이 즉시 반영되지 않던 문제 해결
.refresh()를 호출했지만, 그룹 생성 API가 비동기적으로 처리되어 목록에 새로운 그룹이 바로 반영되지 않는 경우가 있었습니다.ViewModel.createGroup()을suspend함수로 변경하고, UI에서 coroutine으로 해당 함수를 호출한 뒤.refresh()를 순차적으로 실행하도록 구조를 변경했습니다.서버의 추가 데이터 포함 응답 방식에 대응한 페이징 처리 개선
pageSize + 1개의 항목을 반환하고, 클라이언트는 이 추가 데이터를 통해 다음 페이지의 존재 여부를 판단합니다.OffsetPagingSource는 다음과 같이 동작하도록 수정했습니다:pageSize까지만 화면에 노출pageSize를 초과할 경우에만nextKey를 설정