UI/Models/Dialog.cs
branchsync
changeset 2829 cf97661db398
parent 2789 04b1369a0456
child 2835 417b06496e98
     1.1 --- a/UI/Models/Dialog.cs	Wed Oct 23 13:14:06 2019 +0200
     1.2 +++ b/UI/Models/Dialog.cs	Thu Oct 24 11:54:07 2019 +0200
     1.3 @@ -117,7 +117,10 @@
     1.4                  {
     1.5                      pEpIdentity _identity = identity.ToCOMType();
     1.6                      _identity = ThisAddIn.PEPEngine.UpdateIdentity(_identity);
     1.7 -                    identity = new PEPIdentity(_identity);
     1.8 +                    identity = new PEPIdentity(_identity)
     1.9 +                    {
    1.10 +                        Rating = ThisAddIn.PEPEngine.RatingFromCommType(_identity.CommType)
    1.11 +                    };
    1.12  
    1.13                  }
    1.14                  catch (Exception ex)
    1.15 @@ -125,20 +128,6 @@
    1.16                      Log.Error("Dialog.Ctr: Error updating partner. " + ex.ToString());
    1.17                  }
    1.18  
    1.19 -                // Determine the partner's rating
    1.20 -                if (identity?.Fingerprint != null)
    1.21 -                {
    1.22 -                    try
    1.23 -                    {
    1.24 -                        pEpRating rating = ThisAddIn.PEPEngine.GetKeyRatingForUser(identity.UserId, identity.Fingerprint);
    1.25 -                        identity.Rating = rating;
    1.26 -                    }
    1.27 -                    catch (Exception ex)
    1.28 -                    {
    1.29 -                        Log.Error("Dialog.Ctr: Error getting partner rating. " + ex.ToString());
    1.30 -                    }
    1.31 -                }
    1.32 -
    1.33                  identities[i] = identity;
    1.34              }
    1.35          }