Added small fix for retrieval of non-Exchange deleted tasks
This commit is contained in:
parent
14def3a3a2
commit
1bca1fab38
@ -240,9 +240,16 @@ namespace Outlook2013TodoAddIn
|
|||||||
{
|
{
|
||||||
List<OLTaskItem> tasks = new List<OLTaskItem>();
|
List<OLTaskItem> tasks = new List<OLTaskItem>();
|
||||||
foreach (object item in todoFolder.Items)
|
foreach (object item in todoFolder.Items)
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
tasks.Add(new OLTaskItem(item));
|
tasks.Add(new OLTaskItem(item));
|
||||||
}
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
// Do nothing, probably the task had already been deleted
|
||||||
|
}
|
||||||
|
}
|
||||||
return tasks.Where(t => t.ValidTaskItem).ToList(); // Filter out invalid ones
|
return tasks.Where(t => t.ValidTaskItem).ToList(); // Filter out invalid ones
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user