feat(mail): Add 'View raw message' mail contextual option. This option open message in a popup without HTML mail CSS content modification.

This commit is contained in:
smizrahi
2024-05-22 10:15:58 +02:00
parent 9eb8039698
commit 6ac8525bfe
11 changed files with 107 additions and 3 deletions
@@ -48,16 +48,34 @@
*/
@interface UIxMailPartAlternativeViewer : UIxMailPartMixedViewer
{
BOOL rawContent;
}
@end
@implementation UIxMailPartAlternativeViewer
- (id) init
{
if ((self = [super init]))
{
rawContent = NO;
}
return self;
}
- (void) dealloc
{
[super dealloc];
}
- (void)activateRawContent
{
rawContent = YES;
}
/* part selection */
- (NSArray *) childPartTypes
@@ -206,6 +224,9 @@
[viewer setAttachmentIds: attachmentIds];
if ([self decodedFlatContent])
[viewer setDecodedContent: [parts objectAtIndex: i]];
if ([viewer isKindOfClass:NSClassFromString(@"UIxMailPartHTMLViewer")] && rawContent)
[viewer activateRawContent];
[renderedParts addObject: [viewer renderedPart]];
}