Disable Force Protection if Enable Protection is being disabled OUT-470
authorThomas
Thu, 19 Jul 2018 14:35:39 +0200
branchOUT-470
changeset 2306 d5aad9e654c6
parent 2305 f0d2f138c306
child 2307 b138958bd241
Disable Force Protection if Enable Protection is being disabled
UI/FormRegionPrivacyStatus.cs
UI/HandshakeDialog.xaml.cs
UI/RibbonCustomizations.cs
--- a/UI/FormRegionPrivacyStatus.cs	Thu Jul 19 11:04:17 2018 +0200
+++ b/UI/FormRegionPrivacyStatus.cs	Thu Jul 19 14:35:39 2018 +0200
@@ -283,7 +283,6 @@
                 // Build dialog
                 if (message != null)
                 {
-                    message.Rating = AdapterExtensions.ReevaluateMessageRating(message);
                     handshakeDialog = new HandshakeDialog(message, this.cryptableMailItem.Myself, this.cryptableMailItem.IsDraft);
                     handshakeDialog.OnUpdateStatus += HandshakeDialog_Updated;
                     handshakeDialog.Closed += HandshakeDialog_Closed;
--- a/UI/HandshakeDialog.xaml.cs	Thu Jul 19 11:04:17 2018 +0200
+++ b/UI/HandshakeDialog.xaml.cs	Thu Jul 19 14:35:39 2018 +0200
@@ -127,7 +127,7 @@
             this._Message = message;
             this._IsIncoming = message.Direction == pEpMsgDirection.pEpDirIncoming;
             this._IsDraft = isDraft;
-            this._MessageRating = (this._IsDraft) ? message.GetOutgoingRating() : message.Rating;
+            this._MessageRating = (this._IsDraft) ? message.GetOutgoingRating() : AdapterExtensions.ReevaluateMessageRating(message);
 
             try
             {
--- a/UI/RibbonCustomizations.cs	Thu Jul 19 11:04:17 2018 +0200
+++ b/UI/RibbonCustomizations.cs	Thu Jul 19 14:35:39 2018 +0200
@@ -1059,10 +1059,11 @@
         {
             this.SetProperty(control, MailItemExtensions.PEPProperty.EnableProtection, isPressed);
 
-            // If protection is disabled, disable also never unsecure
+            // If protection is disabled, disable also force protected and never unsecure
             if (isPressed == false)
             {
-                this.SetNeverUnsecure(control, isPressed);
+                this.SetForceProtection(control, false);
+                this.SetNeverUnsecure(control, false);
             }
         }