download notification progress and download bar, chat only option for notifications (idk why you would bother even enabling the lightless nofis then)
This commit is contained in:
@@ -24,8 +24,6 @@ public class DownloadUi : WindowMediatorSubscriberBase
|
||||
private readonly ConcurrentDictionary<GameObjectHandler, bool> _uploadingPlayers = new();
|
||||
private bool _notificationDismissed = true;
|
||||
private int _lastDownloadStateHash = 0;
|
||||
private DateTime _lastNotificationUpdate = DateTime.MinValue;
|
||||
private const int NotificationAutoCloseSeconds = 15;
|
||||
|
||||
public DownloadUi(ILogger<DownloadUi> logger, DalamudUtilService dalamudUtilService, LightlessConfigService configService,
|
||||
PairProcessingLimiter pairProcessingLimiter, FileUploadManager fileTransferManager, LightlessMediator mediator, UiSharedService uiShared,
|
||||
@@ -149,20 +147,6 @@ public class DownloadUi : WindowMediatorSubscriberBase
|
||||
_notificationDismissed = true;
|
||||
_lastDownloadStateHash = 0;
|
||||
}
|
||||
|
||||
// Auto-dismiss notification if no updates for 15 seconds
|
||||
if (!_notificationDismissed && _lastNotificationUpdate != DateTime.MinValue)
|
||||
{
|
||||
var timeSinceLastUpdate = (DateTime.UtcNow - _lastNotificationUpdate).TotalSeconds;
|
||||
if (timeSinceLastUpdate > NotificationAutoCloseSeconds)
|
||||
{
|
||||
_logger.LogDebug("Auto-dismissing download notification after {Seconds}s of inactivity", timeSinceLastUpdate);
|
||||
Mediator.Publish(new LightlessNotificationDismissMessage("pair_download_progress"));
|
||||
_notificationDismissed = true;
|
||||
_lastDownloadStateHash = 0;
|
||||
_lastNotificationUpdate = DateTime.MinValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -379,7 +363,6 @@ public class DownloadUi : WindowMediatorSubscriberBase
|
||||
if (currentHash != _lastDownloadStateHash)
|
||||
{
|
||||
_lastDownloadStateHash = currentHash;
|
||||
_lastNotificationUpdate = DateTime.UtcNow;
|
||||
if (downloadStatus.Count > 0 || queueWaiting > 0)
|
||||
{
|
||||
Mediator.Publish(new PairDownloadStatusMessage(downloadStatus, queueWaiting));
|
||||
|
||||
Reference in New Issue
Block a user