delay start scan to ingame login, show what is halting scans in settings ui and allow resetting it

This commit is contained in:
Stanley Dimant
2022-09-28 23:10:29 +02:00
parent ff4079a16d
commit e71bd0d80f
5 changed files with 63 additions and 32 deletions

View File

@@ -3,6 +3,7 @@ using System.IO;
using System.Linq;
using System.Numerics;
using System.Runtime.InteropServices;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using Dalamud.Interface;
@@ -165,6 +166,15 @@ namespace MareSynchronos.UI
_cacheScanner.InvokeScan(true);
}
}
else if (_cacheScanner.haltScanLocks.Any(f => f.Value > 0))
{
ImGui.Text("Halted (" + string.Join(", ", _cacheScanner.haltScanLocks.Where(f => f.Value > 0).Select(locker => locker.Key + ": " + locker.Value + " halt requests")) + ")");
ImGui.SameLine();
if (ImGui.Button("Reset halt requests##clearlocks"))
{
_cacheScanner.ResetLocks();
}
}
else
{
ImGui.Text("Next scan in " + _cacheScanner.TimeUntilNextScan);
@@ -455,7 +465,7 @@ namespace MareSynchronos.UI
{
_pluginConfiguration.CacheFolder = path;
_pluginConfiguration.Save();
_cacheScanner.StartWatchers();
_cacheScanner.StartScan();
}
});
}