From 4ca3b6da48dd70d16d3344c983e8ead9b4af5872 Mon Sep 17 00:00:00 2001 From: CakeAndBanana Date: Sun, 5 Oct 2025 12:57:10 +0200 Subject: [PATCH] Fixed UID not being copied, Removed UIRefreshcall on BroadcastUI and replaced with internal calls while loading or selecting. --- LightlessSync/UI/BroadcastUI.cs | 6 +++--- LightlessSync/UI/CompactUI.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/LightlessSync/UI/BroadcastUI.cs b/LightlessSync/UI/BroadcastUI.cs index b83e657..5749a9c 100644 --- a/LightlessSync/UI/BroadcastUI.cs +++ b/LightlessSync/UI/BroadcastUI.cs @@ -49,8 +49,6 @@ namespace LightlessSync.UI MinimumSize = new(600, 465), MaximumSize = new(750, 525) }; - - mediator.Subscribe(this, async _ => await RefreshSyncshells().ConfigureAwait(false)); } private void RebuildSyncshellDropdownOptions() @@ -121,7 +119,7 @@ namespace LightlessSync.UI public override void OnOpen() { _userUid = _apiController.UID; - _ = RefreshSyncshellsInternal(); + _ = RefreshSyncshells(); } protected override void DrawInternal() @@ -268,6 +266,7 @@ namespace LightlessSync.UI if (_allSyncshells == null) { ImGui.Text("Loading Syncshells..."); + _ = RefreshSyncshells(); return; } @@ -319,6 +318,7 @@ namespace LightlessSync.UI { _configService.Current.SelectedFinderSyncshell = gid; _configService.Save(); + _ = RefreshSyncshells(); } if (!available && ImGui.IsItemHovered()) diff --git a/LightlessSync/UI/CompactUI.cs b/LightlessSync/UI/CompactUI.cs index 42311c6..1f45cb5 100644 --- a/LightlessSync/UI/CompactUI.cs +++ b/LightlessSync/UI/CompactUI.cs @@ -671,7 +671,7 @@ public class CompactUi : WindowMediatorSubscriberBase UiSharedService.AttachToolTip("Click to copy"); if (uidFooterClicked) { - _lightlessMediator.Publish(new UiToggleMessage(typeof(DataAnalysisUi))); + ImGui.SetClipboardText(_apiController.UID); } } }