This repository has been archived by the owner on Jan 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
[Fix] ChartView category change is not working correctly #58
Comments
ChoiysApple
added a commit
that referenced
this issue
Dec 12, 2023
### Describe - In Charts View, list content seems like not changing when category is changed but It's reloading - New list was appended to existing list but it should replace existing list - Because `currentPage` property is added by 1 whenever category changed, new list is considered as next list ### Changes Made Remove currentPage adding code from `requestData(category: MovieListCategory)` ```swift func requestData(category: MovieListCategory) { if currentCategory != category { currentPage = 1 } currentCategory = category fetchData(category: category) // current page += 1 } ``` ### Issues Resolved - #58 <!-- If this pull request addresses or closes any related issues, mention them here. Use the GitHub issue linking format (e.g., "Feature #123"). -->
ChoiysApple
added a commit
that referenced
this issue
Dec 12, 2023
This was referenced Dec 12, 2023
ChoiysApple
added a commit
that referenced
this issue
Dec 12, 2023
### Describe - In Charts View, list content seems like not changing when category is changed but It's reloading - New list was appended to existing list but it should replace existing list - Because `currentPage` property is added by 1 whenever category changed, new list is considered as next list ### Changes Made Remove currentPage adding code from `requestData(category: MovieListCategory)` ```swift func requestData(category: MovieListCategory) { if currentCategory != category { currentPage = 1 } currentCategory = category fetchData(category: category) // current page += 1 } ``` ### Issues Resolved - #58 <!-- If this pull request addresses or closes any related issues, mention them here. Use the GitHub issue linking format (e.g., "Feature #123"). -->
CauseList content is reloading but list from API if appended to existing list but it should replace existing list In
Solutionremoved invalid func requestData(category: MovieListCategory) {
if currentCategory != category { currentPage = 1 }
currentCategory = category
fetchData(category: category)
// current page += 1
} |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Describe
When new category is selected from
UIMenu
, Chart Table View should be reloaded immediately. But It doesn't reload until manual refreshTo Reproduce
UIMenu
Expected behavior
Chart Table should reload immediately when
UIMenu
selectedScreenshots
The text was updated successfully, but these errors were encountered: