feat(mail): new option to force default identity

Users can now force the default identity to always be used when replying
or forwarding a message.
This commit is contained in:
Francis Lachapelle
2021-01-14 15:23:43 -05:00
parent 2826c83fc5
commit fc4f5d2161
12 changed files with 77 additions and 30 deletions
+4 -1
View File
@@ -1,5 +1,5 @@
/*
Copyright (C) 2006-2020 Inverse inc.
Copyright (C) 2006-2021 Inverse inc.
This file is part of SOGo.
@@ -884,6 +884,9 @@
[mailAccount setObject: identities forKey: @"identities"];
[identities release];
if ([_defaults mailForceDefaultIdentity])
[mailAccount setObject: [NSNumber numberWithBool: YES] forKey: @"forceDefaultIdentity"];
// 6. Receipts
if ([_defaults allowUserReceipt])
{
+4 -1
View File
@@ -1,6 +1,6 @@
/* SOGoUserDefaults.h - this file is part of SOGo
*
* Copyright (C) 2011-2020 Inverse inc.
* Copyright (C) 2011-2021 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -185,6 +185,9 @@ extern NSString *SOGoWeekStartFirstFullWeek;
- (void) setMailIdentities: (NSArray *) newIdentites;
- (NSArray *) mailIdentities;
- (void) setMailForceDefaultIdentity: (BOOL) newValue;
- (BOOL) mailForceDefaultIdentity;
- (void) setAuxiliaryMailAccounts: (NSArray *) newAccounts;
- (NSArray *) auxiliaryMailAccounts;
+11 -1
View File
@@ -1,6 +1,6 @@
/* SOGoUserDefaults.m - this file is part of SOGo
*
* Copyright (C) 2009-2020 Inverse inc.
* Copyright (C) 2009-2021 Inverse inc.
*
* This file is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -768,6 +768,16 @@ NSString *SOGoWeekStartFirstFullWeek = @"FirstFullWeek";
return [self arrayForKey: @"SOGoMailIdentities"];
}
- (void) setMailForceDefaultIdentity: (BOOL) newValue
{
[self setBool: newValue forKey: @"SOGoMailForceDefaultIdentity"];
}
- (BOOL) mailForceDefaultIdentity
{
return [self boolForKey: @"SOGoMailForceDefaultIdentity"];
}
- (void) setAuxiliaryMailAccounts: (NSArray *) newAccounts
{
[self setObject: newAccounts forKey: @"AuxiliaryMailAccounts"];