Rename FlowedMessageUtils to FormatFlowedHelper
This commit is contained in:
parent
97b53fb685
commit
6c2f4b6354
3 changed files with 6 additions and 6 deletions
|
@ -5,7 +5,7 @@ import static com.fsck.k9.mail.internet.MimeUtility.getHeaderParameter;
|
|||
import static com.fsck.k9.mail.internet.MimeUtility.isSameMimeType;
|
||||
|
||||
|
||||
class FlowedMessageUtils {
|
||||
class FormatFlowedHelper {
|
||||
private static final String TEXT_PLAIN = "text/plain";
|
||||
private static final String HEADER_PARAM_FORMAT = "format";
|
||||
private static final String HEADER_FORMAT_FLOWED = "flowed";
|
|
@ -25,7 +25,7 @@ import timber.log.Timber;
|
|||
|
||||
import static com.fsck.k9.mail.internet.CharsetSupport.fixupCharset;
|
||||
import static com.fsck.k9.mail.internet.MimeUtility.getHeaderParameter;
|
||||
import static com.fsck.k9.mail.internet.FlowedMessageUtils.isFormatFlowed;
|
||||
import static com.fsck.k9.mail.internet.FormatFlowedHelper.isFormatFlowed;
|
||||
import static com.fsck.k9.mail.internet.MimeUtility.isSameMimeType;
|
||||
import static com.fsck.k9.mail.internet.Viewable.Alternative;
|
||||
import static com.fsck.k9.mail.internet.Viewable.Html;
|
||||
|
@ -203,7 +203,7 @@ public class MessageExtractor {
|
|||
Viewable viewable;
|
||||
if (isSameMimeType(mimeType, "text/plain")) {
|
||||
if (isFormatFlowed(part.getContentType())) {
|
||||
boolean delSp = FlowedMessageUtils.isDelSp(part.getContentType());
|
||||
boolean delSp = FormatFlowedHelper.isDelSp(part.getContentType());
|
||||
viewable = new Flowed(part, delSp);
|
||||
} else {
|
||||
viewable = new Text(part);
|
||||
|
|
|
@ -3,13 +3,13 @@ package com.fsck.k9.mail.internet;
|
|||
|
||||
import org.junit.Test;
|
||||
|
||||
import static com.fsck.k9.mail.internet.FlowedMessageUtils.isDelSp;
|
||||
import static com.fsck.k9.mail.internet.FlowedMessageUtils.isFormatFlowed;
|
||||
import static com.fsck.k9.mail.internet.FormatFlowedHelper.isDelSp;
|
||||
import static com.fsck.k9.mail.internet.FormatFlowedHelper.isFormatFlowed;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
|
||||
public class FlowedMessageUtilsTest {
|
||||
public class FormatFlowedHelperTest {
|
||||
@Test
|
||||
public void isFormatFlowed_withTextPlainFormatFlowed_shouldReturnTrue() throws Exception {
|
||||
assertTrue(isFormatFlowed("text/plain; format=flowed"));
|
Loading…
Reference in a new issue