Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improved replying to and forwarding emails (issues: 3668, 3400, 3676) #96

Closed
wants to merge 12 commits into from
Closed

Conversation

rabcyr
Copy link
Contributor

@rabcyr rabcyr commented Nov 8, 2011

Issues resolved:
Issue 3668: Reply quote ">" not working
Issue 3400: No separate format settings for replies and forwards
Issue 3676: signature appears above quoted text even when "after quoted text" is selected

Summary of functional changes:

  • fixed quoting of text/plain reply when sending text/html messages (builds plain reply separately instead of converting from the html).
  • forwarded messages always use QuoteStyle.HEADER.
  • can have reply and signature before quote, reply and signature after quote, or reply before and signature after quote (setting reply after and signature before still corrects to both after).
  • consistent look between text/plain and text/html parts.

Note: replying to an email without a text/plain part will give the same broken result as before in the odd case that it's a reply to a reply, but most if not all html-only emails are autogenerated.


if (mSourceMessage != null) {
quote = getBodyTextFromMessage(mSourceMessage, MessageFormat.TEXT);
if (quote.startsWith(K9_REPLY_TAG)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a bit uncomfortable with us having K9 metadata inside the message body. If this draft is opened in another mail client, they see ugly metadata. Can we use the K9-Identity header with the tag positions?

}
}

// Version identifier for "new style" identity. ! is an impossible value in base64 encoding, so we
// use that to determine which version we're in.
private static final String IDENTITY_VERSION_1 = "!";
private static final String IDENTITY_VERSION_2 = "@";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there's any reason to go to a version 2 here unless V2 is incompatible with V1 (which it doesn't appear to be). As long as you're able to handle nulls (which should be happening anyway, as users with V1 identities may be loading messages after this goes out), V1 should be fine. Plus it reduces some of the "isV1 || isV2" complexity below.

The main reason I added the concept of Version was to differentiate between the old style (which was essentially CSV without a header) to the new style (which are extensible name-value pairs).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i didn't think it was needed, either, but i did it because cketti wants his import/export code strictly versioned if fields are added, even though his code handled my adding of an account option just fine (it either ignores a new field if an older version of import or sets a field to default if it's not defined).

@andrewachen
Copy link
Contributor

Amalgamation is merged here: 1012ad5

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants