mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 22:17:22 +01:00
fix transfer progress, add glamourer unlock by name, fix dtrbar, add to xlplugins main
This commit is contained in:
parent
706aab5bb9
commit
864c76d258
8 changed files with 48 additions and 30 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue