Skip to content

Commit

Permalink
Fix crash issue when open the chat notification
Browse files Browse the repository at this point in the history
  • Loading branch information
tien-awair committed Jun 3, 2022
1 parent a16dd1c commit 9c5eb50
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,9 @@ public List<Member> getMembers() {
public void onPhonebookUpdated() {
Handler handler = new Handler(getContext().getMainLooper());
handler.post(() -> {
binding.chvChannelHeader.getTitleTextView().setText(ChannelUtils.makeTitleText(channel));
if (channel != null) {
binding.chvChannelHeader.getTitleTextView().setText(ChannelUtils.makeTitleText(channel));
}
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,10 @@ public void setSenderName(Sender sender) {
private void refreshSenderName() {
Handler handler = new Handler(getContext().getMainLooper());
handler.post(() -> {
String nickname = UserUtils.getDisplayName(getContext(), sender);
setText(nickname);
if (sender != null) {
String nickname = UserUtils.getDisplayName(getContext(), sender);
setText(nickname);
}
});
}

Expand Down

0 comments on commit 9c5eb50

Please sign in to comment.