Skip to content
This repository has been archived by the owner on Aug 2, 2024. It is now read-only.

[ Fix ]: App Crash when scroll to page 2 in Gallery Screen #956

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class UnsplashRepository @Inject constructor(private val service: UnsplashServic

fun getSearchResultStream(query: String): Flow<PagingData<UnsplashPhoto>> {
return Pager(
config = PagingConfig(enablePlaceholders = false, pageSize = NETWORK_PAGE_SIZE),
config = PagingConfig(enablePlaceholders = false, pageSize = NETWORK_PAGE_SIZE, initialLoadSize = NETWORK_PAGE_SIZE),
pagingSourceFactory = { UnsplashPagingSource(service, query) }
).flow
}
Expand Down