Merge branch '1.12.4' into download-bar
This commit is contained in:
@@ -59,13 +59,21 @@ public class DownloadUi : WindowMediatorSubscriberBase
|
||||
|
||||
IsOpen = true;
|
||||
|
||||
Mediator.Subscribe<DownloadStartedMessage>(this, (msg) => _currentDownloads[msg.DownloadId] = msg.DownloadStatus);
|
||||
Mediator.Subscribe<DownloadStartedMessage>(this, (msg) =>
|
||||
{
|
||||
_currentDownloads[msg.DownloadId] = msg.DownloadStatus;
|
||||
_notificationDismissed = false;
|
||||
});
|
||||
Mediator.Subscribe<DownloadFinishedMessage>(this, (msg) =>
|
||||
{
|
||||
_currentDownloads.TryRemove(msg.DownloadId, out _);
|
||||
if (!_currentDownloads.Any())
|
||||
|
||||
// Dismiss notification if all downloads are complete
|
||||
if (!_currentDownloads.Any() && !_notificationDismissed)
|
||||
{
|
||||
Mediator.Publish(new LightlessNotificationDismissMessage("pair_download_progress"));
|
||||
_notificationDismissed = true;
|
||||
_lastDownloadStateHash = 0;
|
||||
}
|
||||
});
|
||||
Mediator.Subscribe<GposeStartMessage>(this, (_) => IsOpen = false);
|
||||
@@ -373,5 +381,4 @@ public class DownloadUi : WindowMediatorSubscriberBase
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user