mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-30 10:47:17 +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:
@@ -274,6 +274,16 @@ static NSString *mailETag = nil;
|
||||
/* actions */
|
||||
|
||||
- (id <WOActionResults>) defaultAction
|
||||
{
|
||||
return [self view: NO];
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) viewRawAction
|
||||
{
|
||||
return [self view: YES];
|
||||
}
|
||||
|
||||
- (id <WOActionResults>) view: (BOOL)raw
|
||||
{
|
||||
WOResponse *response;
|
||||
NSMutableDictionary *data;
|
||||
@@ -336,6 +346,12 @@ static NSString *mailETag = nil;
|
||||
}
|
||||
|
||||
viewer = [self contentViewerComponent]; // set attachmentIds for common parts
|
||||
|
||||
if (raw && ([viewer isKindOfClass: NSClassFromString(@"UIxMailPartHTMLViewer")]
|
||||
|| [viewer isKindOfClass: NSClassFromString(@"UIxMailPartAlternativeViewer")])) {
|
||||
// In this case, disable html mail content modification by SOGo
|
||||
[viewer activateRawContent];
|
||||
}
|
||||
renderedPart = [viewer renderedPart]; // set attachmentIds for encrypted & TNEF parts
|
||||
|
||||
data = [NSMutableDictionary dictionaryWithObjectsAndKeys:
|
||||
|
||||
Reference in New Issue
Block a user