1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

use built-in TextUtils.join instead of StringBuilder

This commit is contained in:
András Veres-Szentkirályi 2014-02-15 22:05:18 +01:00
parent 1bc3271de3
commit 21fe3f6cd2

View File

@ -18,6 +18,7 @@ import android.os.Handler;
import android.os.Parcelable; import android.os.Parcelable;
import android.support.v4.app.LoaderManager; import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader; import android.support.v4.content.Loader;
import android.text.TextUtils;
import android.text.TextWatcher; import android.text.TextWatcher;
import android.text.util.Rfc822Tokenizer; import android.text.util.Rfc822Tokenizer;
import android.util.AttributeSet; import android.util.AttributeSet;
@ -2776,12 +2777,9 @@ public class MessageCompose extends K9Activity implements OnClickListener,
if (message.getMessageId() != null && message.getMessageId().length() > 0) { if (message.getMessageId() != null && message.getMessageId().length() > 0) {
mInReplyTo = message.getMessageId(); mInReplyTo = message.getMessageId();
if (message.getReferences() != null && message.getReferences().length > 0) { String[] refs = message.getReferences();
StringBuilder buffy = new StringBuilder(); if (refs != null && refs.length > 0) {
for (int i = 0; i < message.getReferences().length; i++) mReferences = TextUtils.join("", refs) + " " + mInReplyTo;
buffy.append(message.getReferences()[i]);
mReferences = buffy.toString() + " " + mInReplyTo;
} else { } else {
mReferences = mInReplyTo; mReferences = mInReplyTo;
} }