diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-04-20 23:06:34 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2024-04-20 23:06:34 +0000 |
commit | 7d3f23473546e151977c52f5e073c7341ff59fbc (patch) | |
tree | b6b7e359b3e8e74a349ba6568115bc131f8e9e40 /app/src/main/java/ml/docilealligator/infinityforreddit | |
parent | c199a78799b1e53ced01be9d5e18d758d1883bf7 (diff) | |
download | infinity-for-reddit-7d3f23473546e151977c52f5e073c7341ff59fbc.tar infinity-for-reddit-7d3f23473546e151977c52f5e073c7341ff59fbc.tar.gz infinity-for-reddit-7d3f23473546e151977c52f5e073c7341ff59fbc.tar.bz2 infinity-for-reddit-7d3f23473546e151977c52f5e073c7341ff59fbc.tar.lz infinity-for-reddit-7d3f23473546e151977c52f5e073c7341ff59fbc.tar.xz infinity-for-reddit-7d3f23473546e151977c52f5e073c7341ff59fbc.tar.zst infinity-for-reddit-7d3f23473546e151977c52f5e073c7341ff59fbc.zip |
Fixed CommentsRecyclerViewAdapter inconsistent update this time?
Diffstat (limited to 'app/src/main/java/ml/docilealligator/infinityforreddit')
2 files changed, 2 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java index b8c38039..766b68b2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/CommentsRecyclerViewAdapter.java @@ -929,7 +929,7 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi if (mVisibleComments.isEmpty()) { isInitiallyLoading = false; isInitiallyLoadingFailed = false; - if (comments.isEmpty()) { + if (comments.isEmpty() || mIsSingleCommentThreadMode) { notifyItemChanged(0); } else { notifyItemRemoved(0); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java index 4bfe129b..30a15137 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewPostDetailFragment.java @@ -1421,7 +1421,7 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic private void fetchCommentsRespectRecommendedSort(boolean changeRefreshState, SortType.Type sortType) { if (mRespectSubredditRecommendedSortType && mPost != null) { - if (mPost.getSuggestedSort() != null && !mPost.getSuggestedSort().equals("null") && !mPost.getSuggestedSort().equals("")) { + if (mPost.getSuggestedSort() != null && !mPost.getSuggestedSort().equals("null") && !mPost.getSuggestedSort().isEmpty()) { try { SortType.Type sortTypeType = SortType.Type.valueOf(mPost.getSuggestedSort().toUpperCase(Locale.US)); activity.setTitle(sortTypeType.fullName); |