make sure context is not null before setting content description on send button

This commit is contained in:
Daniel Gultsch 2017-04-25 14:11:45 +02:00
parent c837e0616a
commit 848c339c8d

View file

@ -903,9 +903,11 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
updateChatState(this.conversation, msg);
}
this.conversation.trim();
this.mSendButton.setContentDescription(this.getActivity().getApplicationContext().getString(R.string.send_message_to_x,conversation.getName()));
} else {
this.mSendButton.setContentDescription(this.getActivity().getApplicationContext().getString(R.string.send_message));
}
if (activity != null) {
this.mSendButton.setContentDescription(activity.getString(R.string.send_message_to_x,conversation.getName()));
}
this.conversation = conversation;