-
Notifications
You must be signed in to change notification settings - Fork 23
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
Refresh #130
Conversation
api/anilist/src/main/kotlin/com/imashnake/animite/api/anilist/AnilistMediaRepository.kt
Outdated
Show resolved
Hide resolved
api/anilist/src/main/kotlin/com/imashnake/animite/api/anilist/AnilistMediaRepository.kt
Show resolved
Hide resolved
profile/src/main/kotlin/com/imashnake/animite/profile/ProfileViewModel.kt
Outdated
Show resolved
Hide resolved
profile/src/main/kotlin/com/imashnake/animite/profile/ProfileViewModel.kt
Outdated
Show resolved
Hide resolved
api/anilist/src/main/kotlin/com/imashnake/animite/api/anilist/AnilistUserRepository.kt
Show resolved
Hide resolved
screen-20240513-052447.mp4 |
profile/src/main/kotlin/com/imashnake/animite/profile/ProfileScreen.kt
Outdated
Show resolved
Hide resolved
`MutableStateFlow`
screen-20240609-152229.2.mp4 |
api/anilist/src/main/kotlin/com/imashnake/animite/api/anilist/AnilistMediaRepository.kt
Show resolved
Hide resolved
api/anilist/src/main/kotlin/com/imashnake/animite/api/anilist/AnilistUserRepository.kt
Show resolved
Hide resolved
api/anilist/src/main/kotlin/com/imashnake/animite/api/ext/RefreshableFlow.kt
Show resolved
Hide resolved
val allTimePopularList by viewModel.allTimePopular.data.collectAsState() | ||
|
||
val isRefreshing by viewModel.isRefreshing.collectAsState() | ||
val isLoading by viewModel.isLoading.collectAsState() |
There was a problem hiding this comment.
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()) { |
There was a problem hiding this comment.
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
profile/src/main/kotlin/com/imashnake/animite/profile/dev/internal/Constants.kt
Show resolved
Hide resolved
:/ |
CONTRIBUTING.md
.Summary of changes:
CacheFirst
to prevent rate limiting.RefreshableFlow
to reuse inViewModel
s.ProfileScreen
HomeScreen
Tested changes:
i