feat(mail): Add a setting to show the attachments above the mail body

This commit is contained in:
Hivert Quentin
2025-09-19 15:30:45 +02:00
parent a077512e34
commit 5d616600df
9 changed files with 39 additions and 6 deletions
+1 -1
View File
@@ -114,7 +114,7 @@ See <a href=\"http://www.sogo.nu/en/support/community.html\">this page</a> for v
"New password" = "New password";
"Passwords don't match" = "Passwords don't match";
"Confirmation" = "Confirmation";
"Change" = "Changer";
"Change" = "Change";
"Cancel" = "Cancel";
"Please wait..." = "Please wait...";
"Close" = "Close";
@@ -207,6 +207,7 @@
"Insert signature on forward" = "Insert signature on forward";
"Show recipients or sender full email in mailboxes" = "Show recipients or sender full email in mailboxes";
"Hide attachements for inline images" = "Hide attachments for inline images";
"Show attachments above the message" = "Show attachments above the message";
/* Base font size for messages composed in HTML */
"Default font size" = "Default font size";
@@ -207,6 +207,7 @@
"Insert signature on forward" = "Insérer la signature sur un transfert";
"Show recipients or sender full email in mailboxes" = "Afficher l'email complet du destinataire ou expéditeur dans les boîtes aux lettres";
"Hide attachements for inline images" = "Cacher les pièces jointes pour les images 'inline'";
"Show attachments above the message" = "Montrer les pièces jointes au dessus du message";
/* Base font size for messages composed in HTML */
"Default font size" = "Taille de la police par défaut";
+3
View File
@@ -429,6 +429,9 @@ static SoProduct *preferencesProduct = nil;
if (![[defaults source] objectForKey: @"SOGoMailDisplayRemoteInlineImages"])
[[defaults source] setObject: [defaults mailDisplayRemoteInlineImages] forKey: @"SOGoMailDisplayRemoteInlineImages"];
if (![[defaults source] objectForKey: @"SOGoMailDisplayAttachmentAbove"])
[[defaults source] setObject: [defaults mailDisplayAttachmentAbove] forKey: @"SOGoMailDisplayAttachmentAbove"];
if ([[defaults source] objectForKey: @"SOGoMailAutoMarkAsReadDelay"] == nil)
[[defaults source] setObject: [NSNumber numberWithInt: [defaults mailAutoMarkAsReadDelay]] forKey: @"SOGoMailAutoMarkAsReadDelay"];
@@ -721,6 +721,16 @@
</md-checkbox>
</div>
<div>
<md-checkbox
ng-model="app.preferences.defaults.SOGoMailDisplayAttachmentAbove"
ng-true-value="1"
ng-false-value="0"
label:aria-label="Show attachments above the message">
<var:string label:value="Show attachments above the message"/>
</md-checkbox>
</div>
<div>
<md-checkbox
ng-model="app.preferences.defaults.SOGoMailAutoMarkAsReadEnabled"
@@ -462,7 +462,12 @@
// Trusted content that can be compiled (Angularly-speaking)
part.compile = true;
if (!Object.hasOwn(part, 'shouldDisplayAttachment') || 1 == part.shouldDisplayAttachment ) {
parts.push(part);
if(Message.$Preferences.defaults.SOGoMailDisplayAttachmentAbove) {
parts.unshift(part);
}
else {
parts.push(part);
}
}
}
else {