niharika2810 / MovieTray

Its a playground application focusing on Paging3, MVVM architecture, Kotlin Extension functions, Retrofit, DSL, Navigation component, MotionLayout, SharedElementTransition, Single Activity Architecture, DataStore etc.
100 stars 19 forks source link

Try to find issues with the app and propose a solution. #2

Open niharika2810 opened 3 years ago

niharika2810 commented 3 years ago

The app is built in Kotlin with the architectural pattern, dependency injection and Navigation component integrated.

Run the app -> try to find issues -> Write down the steps to reproduce -> Propose a solution for the issue

yogeshpaliyal commented 3 years ago

Hello @niharika2810 , I think there is a typo mistake in the issue description. architectural patetr

niharika2810 commented 3 years ago

Hey Thanks, correcting it.

saitej-janjirala commented 3 years ago

Hello, @niharika2810 the footer(or header) Progress bar from the paginated data is keep on loading even though the network call is completed and the error message is displayed.

we can fix this by showing the progress bar only when the state is loading in the LoadStateViewHolder like this .

    binding.progress.isVisible = loadState is LoadState.Loading

instead of binding.progress.isVisible = loadState !is LoadState.Loading

This is Fixed

saitej-janjirala commented 3 years ago

Hello, @niharika2810 there is no retry option or any button to retry if the data is empty or if it's the first time the user has opened and without an internet connection so the user won't get any data from the DB or from the network so I think there has to be a retry option or some kind of message.

for this we can add a loadstatelistener for the adapter in the both fragments and check the data and we can show the empty layout like this.

adapter.addLoadStateListener { binding.apply { if(it.source.append.endOfPaginationReached && it.source.refresh is LoadState.Loading && adapter.itemCount<1){ photosRecyclerview.isVisible=false textViewEmpty.isVisible=true }else{ textViewEmpty.isVisible=false } } }

This is Fixed