Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh #130

Closed
wants to merge 48 commits into from
Closed

Refresh #130

wants to merge 48 commits into from

Conversation

imashnake0
Copy link
Owner

@imashnake0 imashnake0 commented Mar 28, 2024

Summary of changes:

  1. Use CacheFirst to prevent rate limiting.
  2. Added a RefreshableFlow to reuse in ViewModels.
  3. Pull to refresh on:
    • ProfileScreen
    • HomeScreen

Tested changes:

i

@imashnake0 imashnake0 added enhancement Enhancement feature New feature labels Mar 28, 2024
@imashnake0 imashnake0 self-assigned this Mar 28, 2024
@imashnake0 imashnake0 added this to Doing in Roadmap via automation Mar 28, 2024
@imashnake0 imashnake0 linked an issue Mar 28, 2024 that may be closed by this pull request
`offset {}` is optimal since it uses `graphicsLayer {}`; animated the color change.
This reverts commit ee51ec3.
@imashnake0 imashnake0 moved this from Doing to Needs review in Roadmap Apr 9, 2024
@imashnake0 imashnake0 moved this from Needs review to Doing in Roadmap Apr 9, 2024
@imashnake0 imashnake0 marked this pull request as ready for review May 13, 2024 08:01
@imashnake0
Copy link
Owner Author

screen-20240513-052447.mp4
@imashnake0 imashnake0 requested a review from Iannnr June 9, 2024 11:58
@imashnake0
Copy link
Owner Author

screen-20240609-152229.2.mp4
val allTimePopularList by viewModel.allTimePopular.data.collectAsState()

val isRefreshing by viewModel.isRefreshing.collectAsState()
val isLoading by viewModel.isLoading.collectAsState()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where does isLoading get used?
If the answer is "with isRefreshing", then maybe the ViewModel should be flattening these for us?

}
.asResource()
.stateIn(viewModelScope, SharingStarted.WhileSubscribed(1000), Resource.loading())
val upcomingMediaNextSeason = RefreshableFlow(viewModelScope, Resource.loading()) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have thoughts on API design, see Discord later

@imashnake0
Copy link
Owner Author

:/

@imashnake0 imashnake0 closed this Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement feature New feature
3 participants