mirror of
https://github.com/Kopano-dev/kopano-ol-extension.git
synced 2023-10-10 13:37:40 +02:00
Fixes to small store init issues
This commit is contained in:
parent
66601246b1
commit
16f791818f
@ -160,9 +160,12 @@ namespace Acacia.Stubs.OutlookWrappers
|
|||||||
foreach (KeyValuePair<string, AccountWrapper> remove in removed)
|
foreach (KeyValuePair<string, AccountWrapper> remove in removed)
|
||||||
{
|
{
|
||||||
Logger.Instance.Debug(this, "Account removed: {0} - {1}", remove.Value, remove.Key);
|
Logger.Instance.Debug(this, "Account removed: {0} - {1}", remove.Value, remove.Key);
|
||||||
_accountsBySmtp.Remove(remove.Value.SmtpAddress);
|
|
||||||
_accountsByStoreId.Remove(remove.Key);
|
_accountsByStoreId.Remove(remove.Key);
|
||||||
OnAccountRemoved(remove.Value);
|
if (remove.Value != null)
|
||||||
|
{
|
||||||
|
_accountsBySmtp.Remove(remove.Value.SmtpAddress);
|
||||||
|
OnAccountRemoved(remove.Value);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (System.Exception e)
|
catch (System.Exception e)
|
||||||
|
@ -21,6 +21,7 @@ using Acacia.Utils;
|
|||||||
using Acacia.ZPush.Connect;
|
using Acacia.ZPush.Connect;
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
@ -227,7 +228,7 @@ namespace Acacia.ZPush
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly Dictionary<FolderRegistration, FolderWatcher> _folderWatchers = new Dictionary<FolderRegistration, FolderWatcher>();
|
private readonly ConcurrentDictionary<FolderRegistration, FolderWatcher> _folderWatchers = new ConcurrentDictionary<FolderRegistration, FolderWatcher>();
|
||||||
private ZPushFolder _rootFolder;
|
private ZPushFolder _rootFolder;
|
||||||
|
|
||||||
private void HandleFolderWatchers(ZPushAccount account)
|
private void HandleFolderWatchers(ZPushAccount account)
|
||||||
@ -245,7 +246,7 @@ namespace Acacia.ZPush
|
|||||||
if (!_folderWatchers.TryGetValue(folder, out watcher))
|
if (!_folderWatchers.TryGetValue(folder, out watcher))
|
||||||
{
|
{
|
||||||
watcher = new FolderWatcher();
|
watcher = new FolderWatcher();
|
||||||
_folderWatchers.Add(folder, watcher);
|
_folderWatchers.TryAdd(folder, watcher);
|
||||||
}
|
}
|
||||||
|
|
||||||
watcher.Discovered += handler;
|
watcher.Discovered += handler;
|
||||||
|
Loading…
Reference in New Issue
Block a user