On the app's home page, there are so many sections like the trending section, now playing area, etc. For this, there is a separate method called for communicating with API in HomeViewModel class. All methods change the progress bar status to show and then hide which causes the app to laggy. So go to the app/src/main/java/com/tmdb/homepage/presentation/HomeViewModel and give a better solution for fetching all the files so that the main functionality of the app remains the same.
On the app's home page, there are so many sections like the trending section, now playing area, etc. For this, there is a separate method called for communicating with API in HomeViewModel class. All methods change the progress bar status to show and then hide which causes the app to laggy. So go to the app/src/main/java/com/tmdb/homepage/presentation/HomeViewModel and give a better solution for fetching all the files so that the main functionality of the app remains the same.