Only prefix message with a space if there's an icon to show

This commit is contained in:
Sebastian Kaspari 2010-03-06 20:33:09 +01:00
parent bd932234f5
commit a75539c344
1 changed files with 1 additions and 4 deletions

View File

@ -93,10 +93,7 @@ public class Message {
public SpannableString render(Context context)
{
if (canvas == null) {
String prefix = "\n";
if (hasIcon()) {
prefix = " " + prefix;
}
String prefix = hasIcon() ? "\n " : "\n";
canvas = new SpannableString(prefix + text);
if (hasIcon()) {
Drawable drawable = context.getResources().getDrawable(icon);