android / android/architecture-samples

Pull to refresh doesn't work when there are no tasks

Open
#916 3 comments 0 reactions 1 assignee Claimed by @AnirudhPudari View on GitHub
Dominant language
Kotlin
Stars
45.8k
Forks
11.9k
PR merge metrics
No merged PRs in 30d

Description

Steps to repro:

- Load app, delete any existing tasks so that "You have no tasks!" is displayed
- swipe vertically downwards

Expected outcome

- The loading spinner is displayed

Actual outcome

- Nothing happens

Further details:

Pull to refresh is implemented in the `LoadingContent` composable. This either displays empty content **or** if it is non empty (specified by the logic `tasks.isEmpty() && !loading`) a container which supports pull to refresh.

So the problem is that the empty content should be displayed inside a container which supports pull to refresh.

Additionally the code is currently using `SwipeRefresh` from the accompanist library which is deprecated and needs migrating https://google.github.io/accompanist/swiperefresh/#migration

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.