From 3f2e4d6640a8919289c2a1bf792850e465b3860c Mon Sep 17 00:00:00 2001 From: choco Date: Tue, 14 Oct 2025 09:36:10 +0200 Subject: [PATCH] small service cleanup --- LightlessSync/UI/DownloadUi.cs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/LightlessSync/UI/DownloadUi.cs b/LightlessSync/UI/DownloadUi.cs index 93cc623..1b1ec16 100644 --- a/LightlessSync/UI/DownloadUi.cs +++ b/LightlessSync/UI/DownloadUi.cs @@ -66,7 +66,7 @@ public class DownloadUi : WindowMediatorSubscriberBase _currentDownloads.TryRemove(msg.DownloadId, out _); if (!_currentDownloads.Any()) { - _notificationService.DismissPairDownloadNotification(); + Mediator.Publish(new LightlessNotificationDismissMessage("pair_download_progress")); } }); Mediator.Subscribe(this, (_) => IsOpen = false); @@ -117,7 +117,7 @@ public class DownloadUi : WindowMediatorSubscriberBase } catch { - // ignore errors thrown from UI + _logger.LogDebug("Error drawing upload progress"); } try @@ -129,7 +129,7 @@ public class DownloadUi : WindowMediatorSubscriberBase if (useNotifications) { - // Use notification system - only update when data actually changes + // Use notification system if (_currentDownloads.Any()) { UpdateDownloadNotificationIfChanged(limiterSnapshot); @@ -137,13 +137,14 @@ public class DownloadUi : WindowMediatorSubscriberBase } else if (!_notificationDismissed) { - _notificationService.DismissPairDownloadNotification(); + Mediator.Publish(new LightlessNotificationDismissMessage("pair_download_progress")); _notificationDismissed = true; _lastDownloadStateHash = 0; } } else { + // Use text overlay if (limiterSnapshot.IsEnabled) { var queueColor = limiterSnapshot.Waiting > 0 ? ImGuiColors.DalamudYellow : ImGuiColors.DalamudGrey; @@ -185,7 +186,7 @@ public class DownloadUi : WindowMediatorSubscriberBase } catch { - // ignore errors thrown from UI + _logger.LogDebug("Error drawing download progress"); } } @@ -257,7 +258,7 @@ public class DownloadUi : WindowMediatorSubscriberBase } catch { - // ignore errors thrown on UI + _logger.LogDebug("Error drawing upload progress"); } } }