aboutsummaryrefslogtreecommitdiff
path: root/app/src/main
diff options
context:
space:
mode:
authorscria1000 <91804886+scria1000@users.noreply.github.com>2021-12-01 18:35:41 +0000
committerscria1000 <91804886+scria1000@users.noreply.github.com>2021-12-01 18:35:41 +0000
commit68db5a670db01d5e05884a825bd358a1df53ddd5 (patch)
treec98c5fd0e91e73f1848b20d6cdcc16334658051c /app/src/main
parente2964893da08196df2786def9677f68ece6a43d0 (diff)
downloadinfinity-for-reddit-68db5a670db01d5e05884a825bd358a1df53ddd5.tar
infinity-for-reddit-68db5a670db01d5e05884a825bd358a1df53ddd5.tar.gz
infinity-for-reddit-68db5a670db01d5e05884a825bd358a1df53ddd5.tar.bz2
infinity-for-reddit-68db5a670db01d5e05884a825bd358a1df53ddd5.tar.lz
infinity-for-reddit-68db5a670db01d5e05884a825bd358a1df53ddd5.tar.xz
infinity-for-reddit-68db5a670db01d5e05884a825bd358a1df53ddd5.tar.zst
infinity-for-reddit-68db5a670db01d5e05884a825bd358a1df53ddd5.zip
Recover from no result after switching sort mode
Resolves #563
Diffstat (limited to '')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java3
1 files changed, 2 insertions, 1 deletions
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();
}