mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
feat(mail): Add SOGoMailHideInlineAttachments option to hide attachments when inline. Fixes #5490.
This commit is contained in:
@@ -2481,6 +2481,10 @@ Defaults to `NO` when unset.
|
||||
|
||||
Defaults to `inline` when unset.
|
||||
|
||||
|U |SOGoMailHideInlineAttachments
|
||||
|Hide inline message as attachements if set to `YES`. Default value is `NO`.
|
||||
|
||||
|
||||
|U |SOGoMailCustomFullName
|
||||
|The string to use as full name when composing an email, if
|
||||
_SOGoMailCustomFromEnabled_ is set in the user's domain defaults.
|
||||
|
||||
@@ -228,8 +228,11 @@ extern NSString *SOGoPasswordRecoverySecondaryEmail;
|
||||
- (void) setMailLabelsColors: (NSDictionary *) newValues;
|
||||
- (NSDictionary *) mailLabelsColors;
|
||||
|
||||
- (void)setHideInlineAttachments:(BOOL)newValue;
|
||||
- (BOOL)hideInlineAttachments;
|
||||
|
||||
/* calendar */
|
||||
- (void) setCalendarCategories: (NSArray *) newValues;
|
||||
- (void)setCalendarCategories : (NSArray *)newValues;
|
||||
- (NSArray *) calendarCategories;
|
||||
|
||||
- (void) setCalendarCategoriesColors: (NSDictionary *) newValues;
|
||||
|
||||
@@ -959,6 +959,16 @@ NSString *SOGoPasswordRecoverySecondaryEmail = @"SecondaryEmail";
|
||||
return [self objectForKey: @"SOGoMailLabelsColors"];
|
||||
}
|
||||
|
||||
- (void) setHideInlineAttachments: (BOOL) newValue
|
||||
{
|
||||
[self setBool: newValue forKey: @"SOGoMailHideInlineAttachments"];
|
||||
}
|
||||
|
||||
- (BOOL) hideInlineAttachments
|
||||
{
|
||||
return [self boolForKey: @"SOGoMailHideInlineAttachments"];
|
||||
}
|
||||
|
||||
- (void) setSieveFilters: (NSArray *) newValue
|
||||
{
|
||||
[self setObject: newValue forKey: @"SOGoSieveFilters"];
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
#import <NGMime/NGMimeBodyPart.h>
|
||||
#import <NGMime/NGMimeMultipartBody.h>
|
||||
|
||||
#import <SOGo/SOGoUserDefaults.h>
|
||||
|
||||
#import <UI/MailerUI/WOContext+UIxMailer.h>
|
||||
|
||||
#import "UIxMailRenderingContext.h"
|
||||
@@ -98,6 +100,7 @@
|
||||
NSString *contentType;
|
||||
id viewer, info;
|
||||
NSArray *parts;
|
||||
SOGoUserDefaults *ud;
|
||||
|
||||
NSUInteger i, max;
|
||||
|
||||
@@ -119,14 +122,23 @@
|
||||
[self setChildInfo: [parts objectAtIndex: i]];
|
||||
|
||||
info = [self childInfo];
|
||||
viewer = [[[self context] mailRenderingContext] viewerForBodyInfo: info];
|
||||
[viewer setBodyInfo: info];
|
||||
[viewer setPartPath: [self childPartPath]];
|
||||
if ([self decodedFlatContent])
|
||||
[viewer setDecodedContent: [parts objectAtIndex: i]];
|
||||
[viewer setAttachmentIds: attachmentIds];
|
||||
|
||||
ud = [[[self context] activeUser] userDefaults];
|
||||
|
||||
[renderedParts addObject: [viewer renderedPart]];
|
||||
if (!([info objectForKey:@"disposition"]
|
||||
&& [[info objectForKey:@"disposition"] objectForKey:@"type"]
|
||||
&& [[[info objectForKey:@"disposition"] objectForKey:@"type"] isEqualToString:@"INLINE"]
|
||||
&& [ud hideInlineAttachments])) {
|
||||
viewer = [[[self context] mailRenderingContext] viewerForBodyInfo: info];
|
||||
[viewer setBodyInfo: info];
|
||||
[viewer setPartPath: [self childPartPath]];
|
||||
if ([self decodedFlatContent])
|
||||
[viewer setDecodedContent: [parts objectAtIndex: i]];
|
||||
[viewer setAttachmentIds: attachmentIds];
|
||||
|
||||
|
||||
[renderedParts addObject: [viewer renderedPart]];
|
||||
}
|
||||
}
|
||||
|
||||
contentType = [NSString stringWithFormat: @"%@/%@",
|
||||
|
||||
@@ -204,6 +204,7 @@
|
||||
"Insert signature on new message" = "Insert signature on new message";
|
||||
"Insert signature on reply" = "Insert signature on reply";
|
||||
"Insert signature on forward" = "Insert signature on forward";
|
||||
"Hide inline attachments" = "Hide inline attachments";
|
||||
|
||||
/* Base font size for messages composed in HTML */
|
||||
"Default font size" = "Default font size";
|
||||
|
||||
@@ -204,6 +204,7 @@
|
||||
"Insert signature on new message" = "Insérer la signature sur un nouveau message";
|
||||
"Insert signature on reply" = "Insérer la signature sur une réponse";
|
||||
"Insert signature on forward" = "Insérer la signature sur un transfert";
|
||||
"Hide inline attachments" = "Cacher les pièces jointes 'inline'";
|
||||
|
||||
/* Base font size for messages composed in HTML */
|
||||
"Default font size" = "Taille de la police par défaut";
|
||||
|
||||
@@ -695,6 +695,16 @@
|
||||
</md-checkbox>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<md-checkbox
|
||||
ng-model="app.preferences.defaults.SOGoMailHideInlineAttachments"
|
||||
ng-true-value="1"
|
||||
ng-false-value="0"
|
||||
label:aria-label="Hide inline attachments">
|
||||
<var:string label:value="Hide inline attachments"/>
|
||||
</md-checkbox>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<md-checkbox
|
||||
ng-model="app.preferences.defaults.SOGoMailAutoMarkAsReadEnabled"
|
||||
|
||||
Reference in New Issue
Block a user