From 68db5a670db01d5e05884a825bd358a1df53ddd5 Mon Sep 17 00:00:00 2001 From: scria1000 <91804886+scria1000@users.noreply.github.com> Date: Wed, 1 Dec 2021 21:35:41 +0300 Subject: [PATCH] Recover from no result after switching sort mode Resolves #563 --- .../infinityforreddit/fragments/PostFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java index 257f604e..c7a8e7da 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java @@ -1260,7 +1260,8 @@ public class PostFragment extends Fragment implements FragmentCommunicator { mFetchPostInfoLinearLayout.setOnClickListener(view -> refresh()); showErrorView(R.string.load_posts_error); } - if (appendLoadState instanceof LoadState.NotLoading) { + if (!(refreshLoadState instanceof LoadState.Loading) // #563 + && appendLoadState instanceof LoadState.NotLoading) { if (appendLoadState.getEndOfPaginationReached() && mAdapter.getItemCount() < 1) { noPostFound(); }