fixed sender label for empty conversations
This commit is contained in:
parent
79b2f34685
commit
857c761c68
|
@ -455,6 +455,7 @@ public class Conversation extends AbstractEntity implements Blockable, Comparabl
|
||||||
public Message getLatestMessage() {
|
public Message getLatestMessage() {
|
||||||
if (this.messages.size() == 0) {
|
if (this.messages.size() == 0) {
|
||||||
Message message = new Message(this, "", Message.ENCRYPTION_NONE);
|
Message message = new Message(this, "", Message.ENCRYPTION_NONE);
|
||||||
|
message.setType(Message.TYPE_STATUS);
|
||||||
message.setTime(getCreated());
|
message.setTime(getCreated());
|
||||||
return message;
|
return message;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -115,9 +115,11 @@ public class ConversationAdapter extends ArrayAdapter<Conversation> {
|
||||||
} else {
|
} else {
|
||||||
mSenderName.setVisibility(View.GONE);
|
mSenderName.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (message.getType() != Message.TYPE_STATUS) {
|
||||||
mSenderName.setVisibility(View.VISIBLE);
|
mSenderName.setVisibility(View.VISIBLE);
|
||||||
mSenderName.setText(activity.getString(R.string.me)+':');
|
mSenderName.setText(activity.getString(R.string.me)+':');
|
||||||
|
} else {
|
||||||
|
mSenderName.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue