diff --git a/uikit/src/main/java/com/sendbird/uikit/fragments/ChannelFragment.java b/uikit/src/main/java/com/sendbird/uikit/fragments/ChannelFragment.java index bd263929..462cf897 100644 --- a/uikit/src/main/java/com/sendbird/uikit/fragments/ChannelFragment.java +++ b/uikit/src/main/java/com/sendbird/uikit/fragments/ChannelFragment.java @@ -1815,7 +1815,9 @@ public List 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)); + } }); } diff --git a/uikit/src/main/java/com/sendbird/uikit/widgets/NickNameTextView.java b/uikit/src/main/java/com/sendbird/uikit/widgets/NickNameTextView.java index 7dd0de68..9c0b382b 100644 --- a/uikit/src/main/java/com/sendbird/uikit/widgets/NickNameTextView.java +++ b/uikit/src/main/java/com/sendbird/uikit/widgets/NickNameTextView.java @@ -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); + } }); }