mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:17:22 +01:00
rough impl of FSW, goodbye periodic filescan
This commit is contained in:
parent
ac11ec087a
commit
6f397d9b12
11 changed files with 525 additions and 254 deletions
|
|
@ -16,7 +16,7 @@ namespace MareSynchronos.UI;
|
|||
public class IntroUi : WindowMediatorSubscriberBase
|
||||
{
|
||||
private readonly MareConfigService _configService;
|
||||
private readonly PeriodicFileScanner _fileCacheManager;
|
||||
private readonly CacheMonitor _cacheMonitor;
|
||||
private readonly Dictionary<string, string> _languages = new(StringComparer.Ordinal) { { "English", "en" }, { "Deutsch", "de" }, { "Français", "fr" } };
|
||||
private readonly ServerConfigurationManager _serverConfigurationManager;
|
||||
private readonly UiSharedService _uiShared;
|
||||
|
|
@ -29,11 +29,11 @@ public class IntroUi : WindowMediatorSubscriberBase
|
|||
private string[]? _tosParagraphs;
|
||||
|
||||
public IntroUi(ILogger<IntroUi> logger, UiSharedService uiShared, MareConfigService configService,
|
||||
PeriodicFileScanner fileCacheManager, ServerConfigurationManager serverConfigurationManager, MareMediator mareMediator) : base(logger, mareMediator, "Mare Synchronos Setup")
|
||||
CacheMonitor fileCacheManager, ServerConfigurationManager serverConfigurationManager, MareMediator mareMediator) : base(logger, mareMediator, "Mare Synchronos Setup")
|
||||
{
|
||||
_uiShared = uiShared;
|
||||
_configService = configService;
|
||||
_fileCacheManager = fileCacheManager;
|
||||
_cacheMonitor = fileCacheManager;
|
||||
_serverConfigurationManager = serverConfigurationManager;
|
||||
|
||||
IsOpen = false;
|
||||
|
|
@ -163,11 +163,11 @@ public class IntroUi : WindowMediatorSubscriberBase
|
|||
_uiShared.DrawCacheDirectorySetting();
|
||||
}
|
||||
|
||||
if (!_fileCacheManager.IsScanRunning && !string.IsNullOrEmpty(_configService.Current.CacheFolder) && _uiShared.HasValidPenumbraModPath && Directory.Exists(_configService.Current.CacheFolder))
|
||||
if (!_cacheMonitor.IsScanRunning && !string.IsNullOrEmpty(_configService.Current.CacheFolder) && _uiShared.HasValidPenumbraModPath && Directory.Exists(_configService.Current.CacheFolder))
|
||||
{
|
||||
if (ImGui.Button("Start Scan##startScan"))
|
||||
{
|
||||
_fileCacheManager.InvokeScan(forced: true);
|
||||
_cacheMonitor.InvokeScan();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue