mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-16 08:25:28 +00:00
Misc string comparison optimizations
This commit is contained in:
@@ -55,11 +55,11 @@ namespace ArchiSteamFarm {
|
||||
[PublicAPI]
|
||||
public static WebBrowser WebBrowser { get; internal set; }
|
||||
|
||||
private static readonly ConcurrentDictionary<string, object> LastWriteEvents = new ConcurrentDictionary<string, object>();
|
||||
private static readonly SemaphoreSlim UpdateSemaphore = new SemaphoreSlim(1, 1);
|
||||
|
||||
private static Timer AutoUpdatesTimer;
|
||||
private static FileSystemWatcher FileSystemWatcher;
|
||||
private static ConcurrentDictionary<string, object> LastWriteEvents;
|
||||
|
||||
[PublicAPI]
|
||||
public static bool IsOwner(ulong steamID) {
|
||||
@@ -317,7 +317,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
private static void InitEvents() {
|
||||
if (FileSystemWatcher != null) {
|
||||
if ((FileSystemWatcher != null) || (LastWriteEvents != null)) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -328,6 +328,8 @@ namespace ArchiSteamFarm {
|
||||
FileSystemWatcher.Deleted += OnDeleted;
|
||||
FileSystemWatcher.Renamed += OnRenamed;
|
||||
|
||||
LastWriteEvents = new ConcurrentDictionary<string, object>(Bot.BotsComparer);
|
||||
|
||||
FileSystemWatcher.EnableRaisingEvents = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user