-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Conversation
… text/plain body when sending emails with text/html.
|
||
if (mSourceMessage != null) { | ||
quote = getBodyTextFromMessage(mSourceMessage, MessageFormat.TEXT); | ||
if (quote.startsWith(K9_REPLY_TAG)) { |
There was a problem hiding this comment.
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?
…() == QuoteStyle.HEADER
…and set mQuoteStyle to QuoteStyle.HEADER for forwarded messages.
} | ||
} | ||
|
||
// 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 = "@"; |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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).
Amalgamation is merged here: 1012ad5 Thanks! |
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:
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.