Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalyster committed Mar 3, 2020
1 parent f6f1265 commit e81f0c7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat

model.list.setAdapter(adapter);
adapter.setOnItemClickListener((widget, pos) -> {
if (!widget.getTag().equals("clicked")) {
if (widget.getTag() == null || !widget.getTag().equals("clicked")) {
getBaseActivity().replaceFragment(
ThreadFragment.newInstance(adapter.getItem(pos).getMid()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
model.list.setAdapter(adapter);
linearLayoutManager = (LinearLayoutManager) model.list.getLayoutManager();
adapter.setOnItemClickListener((widget, position) -> {
if (!widget.getTag().equals("clicked")) {
if (widget.getTag() == null || !widget.getTag().equals("clicked")) {
Post post = adapter.getItem(position);
onReply(post.getRid(), post.getBody());
}
Expand Down

0 comments on commit e81f0c7

Please sign in to comment.