From b9804990fe4549595bd300268391c3d4d66e198c Mon Sep 17 00:00:00 2001
From: Patrick Simpson
Date: Thu, 1 Feb 2018 11:24:18 +0200
Subject: [PATCH] [KOE-163] Moved initial send/receive to after account setup,
as that caused device id to be unassigned.
---
src/AcaciaZPushPlugin/AcaciaZPushPlugin/ThisAddIn.cs | 6 ++----
.../AcaciaZPushPlugin/ZPush/ZPushAccounts.cs | 3 +++
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ThisAddIn.cs b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ThisAddIn.cs
index e000b51..3278353 100644
--- a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ThisAddIn.cs
+++ b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ThisAddIn.cs
@@ -113,7 +113,8 @@ namespace Acacia
// Create the watcher
Watcher = new ZPushWatcher(Instance);
- OutlookUI.Watcher = Watcher;
+ if (OutlookUI != null)
+ OutlookUI.Watcher = Watcher;
// Allow to features to register whatever they need
Features = new List();
@@ -155,9 +156,6 @@ namespace Acacia
Acacia.Features.DebugSupport.Statistics.StartupTime.Stop();
foreach (Feature feature in Features)
feature.AfterStartup();
-
- // [KOE-148] Initial send receive
- Instance.SendReceive();
}
catch (System.Exception e)
{
diff --git a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ZPush/ZPushAccounts.cs b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ZPush/ZPushAccounts.cs
index 3d5d9de..b3bd825 100644
--- a/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ZPush/ZPushAccounts.cs
+++ b/src/AcaciaZPushPlugin/AcaciaZPushPlugin/ZPush/ZPushAccounts.cs
@@ -77,6 +77,9 @@ namespace Acacia.ZPush
Tasks.Task(null, null, "AccountCheckDone", () =>
{
_watcher.OnAccountsScanned();
+
+ // [KOE-148] Initial send receive
+ ThisAddIn.Instance.SendReceive();
});
// Register for account changes