mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
add a little bit of space between merged messages.
This commit is contained in:
parent
21deda7b00
commit
53e43daa0d
@ -396,7 +396,7 @@ public class Message extends AbstractEntity {
|
||||
public String getMergedBody() {
|
||||
final Message next = this.next();
|
||||
if (this.mergeable(next)) {
|
||||
return getBody().trim() + '\n' + next.getMergedBody();
|
||||
return getBody().trim() + "\n\n" + next.getMergedBody();
|
||||
}
|
||||
return getBody().trim();
|
||||
}
|
||||
|
@ -232,7 +232,13 @@ public class MessageAdapter extends ArrayAdapter<Message> {
|
||||
viewHolder.messageBody.setIncludeFontPadding(true);
|
||||
if (message.getBody() != null) {
|
||||
final String nick = UIHelper.getMessageDisplayName(message);
|
||||
final String formattedBody = message.getMergedBody().replaceAll("^" + Message.ME_COMMAND,nick + " ");
|
||||
final String body = message.getMergedBody().replaceAll("^" + Message.ME_COMMAND,nick + " ");
|
||||
final SpannableString formattedBody = new SpannableString(body);
|
||||
int i = body.indexOf("\n\n");
|
||||
while(i >= 0) {
|
||||
formattedBody.setSpan(new RelativeSizeSpan(0.2f),i,i+2,Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
i = body.indexOf("\n\n",i+2);
|
||||
}
|
||||
if (message.getType() != Message.TYPE_PRIVATE) {
|
||||
if (message.hasMeCommand()) {
|
||||
final Spannable span = new SpannableString(formattedBody);
|
||||
|
Loading…
Reference in New Issue
Block a user