* fix possible npe

* Update ConversationViewHolder.java

* revert unneded changes
main
Bernd 6 years ago committed by Konrad Pozniak
parent 0efd3347d2
commit 80788f560b
  1. 4
      app/src/main/java/com/keylesspalace/tusky/components/conversation/ConversationViewHolder.java

@ -107,7 +107,9 @@ public class ConversationViewHolder extends StatusBaseViewHolder {
private void setConversationName(List<ConversationAccountEntity> accounts) { private void setConversationName(List<ConversationAccountEntity> accounts) {
Context context = conversationNameTextView.getContext(); Context context = conversationNameTextView.getContext();
String conversationName; String conversationName;
if(accounts.size() == 1) { if(accounts.size() == 0) {
conversationName = " ";
}else if(accounts.size() == 1) {
conversationName = context.getString(R.string.conversation_1_recipients, accounts.get(0).getUsername()); conversationName = context.getString(R.string.conversation_1_recipients, accounts.get(0).getUsername());
} else if(accounts.size() == 2) { } else if(accounts.size() == 2) {
conversationName = context.getString(R.string.conversation_2_recipients, accounts.get(0).getUsername(), accounts.get(1).getUsername()); conversationName = context.getString(R.string.conversation_2_recipients, accounts.get(0).getUsername(), accounts.get(1).getUsername());

Loading…
Cancel
Save