Skip to content

Commit

Permalink
Merge branch 'release/3.0.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-brooke committed Dec 1, 2017
2 parents 67f139e + c960fec commit 923d6c6
Show file tree
Hide file tree
Showing 23 changed files with 631 additions and 362 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ SuiteCRMAddIn/Documentation/html/
SuiteCRMAddIn/Documentation/latex/

*.pcapng

*.vsp

*.psess

*.xlsx
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = "SuiteCRM Outlook Add-in"
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 3.0.10.0
PROJECT_NUMBER = 3.0.11.0

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### What's in this repository

SuiteCRM Outlook Plug-In v 3.0.10.0
SuiteCRM Outlook Plug-In v 3.0.11.0

This repository has been created to allow community members to collaborate and contribute to the project.

Expand Down
47 changes: 47 additions & 0 deletions SuiteCRMAddIn/BusinessLogic/AppointmentSyncState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ namespace SuiteCRMAddIn.BusinessLogic
{
using Extensions;
using ProtoItems;
using System.Linq;
using System.Text;
using Outlook = Microsoft.Office.Interop.Outlook;
using System;
using System.Collections.Generic;

public class AppointmentSyncState: SyncState<Outlook.AppointmentItem>
{
Expand Down Expand Up @@ -85,6 +87,51 @@ public override void DeleteItem()
this.OutlookItem.Delete();
}


/// <summary>
/// An appointment may be changed because its recipients have changed.
/// </summary>
/// <returns>True if the underlying item has changed, or its recipients have changed.</returns>
protected override bool ReallyChanged()
{
var result = base.ReallyChanged();

ProtoItem older = this.Cache as ProtoAppointment;

if (older != null)
{
var currentAddresses = new HashSet<string>();
var olderAddresses = new List<string>();
olderAddresses.AddRange(((ProtoAppointment)older).RecipientAddresses);

foreach (Outlook.Recipient recipient in olItem.Recipients)
{
currentAddresses.Add(recipient.GetSmtpAddress());
}
if (currentAddresses.Count == olderAddresses.Count)
{
var sorted = new List<string>();
sorted.AddRange(currentAddresses);
sorted.Sort();

for (int i = 0; i < sorted.Count; i++)
{
if (sorted[i] != olderAddresses[i])
{
result = true;
break;
}
}
}
else
{
result = true;
}
}

return result;
}

/// <summary>
/// Construct a JSON-serialisable representation of my appointment item.
/// </summary>
Expand Down
Loading

0 comments on commit 923d6c6

Please sign in to comment.