mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-06 17:05:10 +00:00
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:
@@ -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]];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user