Skip to content

Commit

Permalink
Fix post listing refresh on return to screen
Browse files Browse the repository at this point in the history
  • Loading branch information
HeroBrine1st committed Jan 5, 2024
1 parent cf187bb commit 0c3ac63
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fun Posts(
// Now I need to connect pullToRefreshState.isRefreshing to posts.loadState.refresh is LoadState.Loading
// Both are data, neither is callback
//region Working around strange API
if (pullToRefreshState.isRefreshing) {
if (pullToRefreshState.isRefreshing && posts.loadState.refresh !is LoadState.Loading) {
LaunchedEffect(Unit) {
posts.refresh()
}
Expand Down

0 comments on commit 0c3ac63

Please sign in to comment.