Skip to content

Commit

Permalink
Fix bug with not showing entire long message when it contains no ment…
Browse files Browse the repository at this point in the history
…ions.
  • Loading branch information
cody-signal committed Aug 10, 2021
1 parent cfab195 commit 3baf10f
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,7 @@ public long getUniqueId(@NonNull MessageDigest digest) {
}

public @NonNull SpannableString getDisplayBody(Context context) {
if (mentions.isEmpty() || body == null) {
return messageRecord.getDisplayBody(context);
}
return body;
return (body != null) ? body : messageRecord.getDisplayBody(context);
}

/**
Expand Down Expand Up @@ -107,7 +104,7 @@ public static class ConversationMessageFactory {
if (messageRecord.isMms() && mentions != null && !mentions.isEmpty()) {
return new ConversationMessage(messageRecord, body, mentions);
}
return createWithResolvedData(messageRecord);
return new ConversationMessage(messageRecord, body, null);
}

/**
Expand Down Expand Up @@ -149,7 +146,7 @@ public static class ConversationMessageFactory {
return new ConversationMessage(messageRecord, updated.getBody(), updated.getMentions());
}
}
return createWithResolvedData(messageRecord);
return createWithResolvedData(messageRecord, body, null);
}
}
}

0 comments on commit 3baf10f

Please sign in to comment.