fix transfer progress, add glamourer unlock by name, fix dtrbar, add to xlplugins main

This commit is contained in:
rootdarkarchon
2023-10-08 11:57:38 +02:00
parent 706aab5bb9
commit 864c76d258
8 changed files with 48 additions and 30 deletions

View File

@@ -18,7 +18,7 @@ public sealed class DtrEntry : IDisposable, IHostedService
private readonly IDtrBar _dtrBar;
private readonly ConfigurationServiceBase<MareConfig> _configService;
private readonly MareMediator _mareMediator;
private Lazy<DtrBarEntry> _entry;
private readonly Lazy<DtrBarEntry> _entry;
private readonly PairManager _pairManager;
private Task? _runTask;
private string? _text;
@@ -40,6 +40,7 @@ public sealed class DtrEntry : IDisposable, IHostedService
{
_logger.LogDebug("Disposing DtrEntry");
Clear();
_entry.Value.Dispose();
}
}
@@ -68,6 +69,7 @@ public sealed class DtrEntry : IDisposable, IHostedService
private DtrBarEntry CreateEntry()
{
_logger.LogTrace("Creating new DtrBar entry");
var entry = _dtrBar.Get("Mare Synchronos");
entry.OnClick = () => _mareMediator.Publish(new UiToggleMessage(typeof(CompactUi)));
@@ -77,13 +79,10 @@ public sealed class DtrEntry : IDisposable, IHostedService
private void Clear()
{
if (!_entry.IsValueCreated) return;
_text = null;
_logger.LogInformation("Clearing entry");
_text = null;
_entry.Value.Shown = false;
_entry.Value.Text = null;
_entry.Value.Dispose();
_entry = new(CreateEntry);
}
private async Task RunAsync()
@@ -138,6 +137,7 @@ public sealed class DtrEntry : IDisposable, IHostedService
text = "\uE044 \uE04C";
tooltip = "Mare Synchronos: Not Connected";
}
if (!string.Equals(text, _text, StringComparison.Ordinal))
{
_text = text;