[KOE-169] Added option to allow FileAs to be set by Outlook in GAB contacts

This commit is contained in:
Patrick Simpson 2018-05-09 14:21:07 +03:00
parent 35ef1e9b92
commit 6ecc15d237
2 changed files with 10 additions and 1 deletions

View File

@ -254,6 +254,14 @@ namespace Acacia.Features.GAB
}
private static readonly BoolOption OPTION_SMTP_GROUPS_AS_CONTACTS = new BoolOption("SMTPGroupsAsContacts", false);
[AcaciaOption("If enabled, the FileAs field will be set to displayName. Otherwise, Outlook will create it.")]
public bool FileAsDisplayName
{
get { return GetOption(OPTION_FILE_AS_DISPLAY_NAME); }
set { SetOption(OPTION_FILE_AS_DISPLAY_NAME, value); }
}
private static readonly BoolOption OPTION_FILE_AS_DISPLAY_NAME = new BoolOption("FileAsDisplayName", false);
#endregion
#region Modification suppression

View File

@ -522,7 +522,8 @@ namespace Acacia.Features.GAB
if (Get<string>(value, "title") != null) contact.JobTitle = Get<string>(value, "title");
if (Get<string>(value, "displayName") != null)
{
contact.FileAs = Get<string>(value, "displayName");
if (_feature.FileAsDisplayName)
contact.FileAs = Get<string>(value, "displayName");
contact.FullName = Get<string>(value, "displayName");
}