Formatting sync
authorThomas
Mon, 29 Jul 2019 11:21:16 +0200
branchsync
changeset 2686f2e370d69120
parent 2685 3f254ed0e797
child 2687 f7f12cd4dd77
Formatting
ThisAddIn.cs
     1.1 --- a/ThisAddIn.cs	Thu Jul 18 16:00:32 2019 +0200
     1.2 +++ b/ThisAddIn.cs	Mon Jul 29 11:21:16 2019 +0200
     1.3 @@ -423,14 +423,7 @@
     1.4                          if (string.IsNullOrWhiteSpace(account.SmtpAddress) == false)
     1.5                          {
     1.6                              // Check if it is already in the list
     1.7 -                            var accountSettings = this._Settings.GetAccountSettings(account.SmtpAddress);
     1.8 -                            if (accountSettings == null)
     1.9 -                            {
    1.10 -                                // Create pEp settings for the new account
    1.11 -                                account.CreatePEPSettings();
    1.12 -                                accountAdded = true;
    1.13 -                            }
    1.14 -                            else
    1.15 +                            if (this._Settings.GetAccountSettings(account.SmtpAddress) is PEPSettings.PEPAccountSettings accountSettings)
    1.16                              {
    1.17                                  // Check for properties that might have not been set correctly due to errors
    1.18                                  // UserName
    1.19 @@ -446,6 +439,12 @@
    1.20                                      }
    1.21                                  }
    1.22                              }
    1.23 +                            else
    1.24 +                            {
    1.25 +                                // Create pEp settings for the new account
    1.26 +                                account.CreatePEPSettings();
    1.27 +                                accountAdded = true;
    1.28 +                            }
    1.29                          }
    1.30                          else
    1.31                          {