mirror of
https://github.com/KokaKiwi/BarInsta
synced 2024-11-14 10:47:30 +00:00
Null check. Fixes austinhuang0131/barinsta#1629
This commit is contained in:
parent
ac98420516
commit
82f1140cbf
@ -64,8 +64,10 @@ public final class LikesViewerFragment extends BottomSheetDialogFragment impleme
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
binding.rvLikes.setAdapter(likesAdapter);
|
binding.rvLikes.setAdapter(likesAdapter);
|
||||||
binding.rvLikes.setLayoutManager(new LinearLayoutManager(getContext()));
|
final Context context = getContext();
|
||||||
binding.rvLikes.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.VERTICAL));
|
if (context == null) return;
|
||||||
|
binding.rvLikes.setLayoutManager(new LinearLayoutManager(context));
|
||||||
|
binding.rvLikes.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.VERTICAL));
|
||||||
binding.swipeRefreshLayout.setRefreshing(false);
|
binding.swipeRefreshLayout.setRefreshing(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,9 +178,11 @@ public final class LikesViewerFragment extends BottomSheetDialogFragment impleme
|
|||||||
binding.swipeRefreshLayout.setOnRefreshListener(this);
|
binding.swipeRefreshLayout.setOnRefreshListener(this);
|
||||||
binding.swipeRefreshLayout.setRefreshing(true);
|
binding.swipeRefreshLayout.setRefreshing(true);
|
||||||
if (isComment && !isLoggedIn) {
|
if (isComment && !isLoggedIn) {
|
||||||
final LinearLayoutManager layoutManager = new LinearLayoutManager(getContext());
|
final Context context = getContext();
|
||||||
|
if (context == null) return;
|
||||||
|
final LinearLayoutManager layoutManager = new LinearLayoutManager(context);
|
||||||
binding.rvLikes.setLayoutManager(layoutManager);
|
binding.rvLikes.setLayoutManager(layoutManager);
|
||||||
binding.rvLikes.addItemDecoration(new DividerItemDecoration(getContext(), DividerItemDecoration.HORIZONTAL));
|
binding.rvLikes.addItemDecoration(new DividerItemDecoration(context, DividerItemDecoration.HORIZONTAL));
|
||||||
lazyLoader = new RecyclerLazyLoader(layoutManager, (page, totalItemsCount) -> {
|
lazyLoader = new RecyclerLazyLoader(layoutManager, (page, totalItemsCount) -> {
|
||||||
if (!TextUtils.isEmpty(endCursor)) {
|
if (!TextUtils.isEmpty(endCursor)) {
|
||||||
graphQLRepository.fetchCommentLikers(
|
graphQLRepository.fetchCommentLikers(
|
||||||
|
Loading…
Reference in New Issue
Block a user