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

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

Open
niharika2810 opened this issue Sep 26, 2021 · 4 comments
Open

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

niharika2810 opened this issue Sep 26, 2021 · 4 comments

Comments

@niharika2810
Copy link
Owner

niharika2810 commented Sep 26, 2021

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
Copy link

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

@niharika2810
Copy link
Owner Author

Hey Thanks, correcting it.

@saitej-janjirala
Copy link
Contributor

saitej-janjirala commented Sep 30, 2021

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
Copy link
Contributor

saitej-janjirala commented Sep 30, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants