diff --git a/LightlessSync/UI/DownloadUi.cs b/LightlessSync/UI/DownloadUi.cs index a520f0a..93cc623 100644 --- a/LightlessSync/UI/DownloadUi.cs +++ b/LightlessSync/UI/DownloadUi.cs @@ -25,8 +25,6 @@ public class DownloadUi : WindowMediatorSubscriberBase private readonly NotificationService _notificationService; private bool _notificationDismissed = true; private int _lastDownloadStateHash = 0; - private DateTime _lastNotificationUpdate = DateTime.MinValue; - private const int MinUpdateIntervalMs = 1000; public DownloadUi(ILogger logger, DalamudUtilService dalamudUtilService, LightlessConfigService configService, PairProcessingLimiter pairProcessingLimiter, FileUploadManager fileTransferManager, LightlessMediator mediator, UiSharedService uiShared, @@ -142,7 +140,6 @@ public class DownloadUi : WindowMediatorSubscriberBase _notificationService.DismissPairDownloadNotification(); _notificationDismissed = true; _lastDownloadStateHash = 0; - _lastNotificationUpdate = DateTime.MinValue; } } else @@ -354,14 +351,11 @@ public class DownloadUi : WindowMediatorSubscriberBase hashCode.Add(queueWaiting); var currentHash = hashCode.ToHashCode(); - var now = DateTime.UtcNow; - var timeSinceLastUpdate = (now - _lastNotificationUpdate).TotalMilliseconds; - // Only update notification if state has changed AND at least 1 second has passed - if (currentHash != _lastDownloadStateHash && timeSinceLastUpdate >= MinUpdateIntervalMs) + // Only update notification if state has actually changed + if (currentHash != _lastDownloadStateHash) { _lastDownloadStateHash = currentHash; - _lastNotificationUpdate = now; if (downloadStatus.Count > 0 || queueWaiting > 0) { _notificationService.ShowPairDownloadNotification(downloadStatus, queueWaiting); diff --git a/LightlessSync/UI/LightlessNotificationUI.cs b/LightlessSync/UI/LightlessNotificationUI.cs index 36fa508..7ced889 100644 --- a/LightlessSync/UI/LightlessNotificationUI.cs +++ b/LightlessSync/UI/LightlessNotificationUI.cs @@ -134,11 +134,7 @@ public class LightlessNotificationUI : WindowMediatorSubscriberBase var viewport = ImGui.GetMainViewport(); - // Set window to full viewport height - var width = _configService.Current.NotificationWidth; - Size = new Vector2(width, viewport.WorkSize.Y); - SizeCondition = ImGuiCond.Always; - + // Window auto-resizes based on content (AlwaysAutoResize flag) Position = CalculateWindowPosition(viewport); PositionCondition = ImGuiCond.Always;