mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-11-07 03:07:26 +01:00
Fix showing duplicate progress bar when refreshing in ViewPostDetailFragment.
This commit is contained in:
parent
4e0af16094
commit
a3b4c54ec2
@ -900,26 +900,12 @@ public class CommentsRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerVi
|
|||||||
|
|
||||||
public void initiallyLoading() {
|
public void initiallyLoading() {
|
||||||
resetCommentSearchIndex();
|
resetCommentSearchIndex();
|
||||||
if (mVisibleComments.size() != 0) {
|
notifyItemRangeRemoved(0, getItemCount());
|
||||||
int previousSize = mVisibleComments.size();
|
|
||||||
mVisibleComments.clear();
|
mVisibleComments.clear();
|
||||||
if (mIsSingleCommentThreadMode) {
|
|
||||||
notifyItemRangeRemoved(0, previousSize + ((mHasMoreComments || loadMoreCommentsFailed) ? 1 : 0) + 1);
|
|
||||||
} else {
|
|
||||||
notifyItemRangeRemoved(0, previousSize + ((mHasMoreComments || loadMoreCommentsFailed) ? 1 : 0));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isInitiallyLoading || isInitiallyLoadingFailed) {
|
|
||||||
isInitiallyLoading = true;
|
|
||||||
isInitiallyLoadingFailed = false;
|
|
||||||
notifyItemChanged(0);
|
|
||||||
} else {
|
|
||||||
isInitiallyLoading = true;
|
isInitiallyLoading = true;
|
||||||
isInitiallyLoadingFailed = false;
|
isInitiallyLoadingFailed = false;
|
||||||
notifyItemInserted(0);
|
notifyItemInserted(0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void initiallyLoadCommentsFailed() {
|
public void initiallyLoadCommentsFailed() {
|
||||||
isInitiallyLoading = false;
|
isInitiallyLoading = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user