mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 15:37:23 +01:00
fully switch to mediator from events
This commit is contained in:
parent
5e7beb8518
commit
41465c2d49
24 changed files with 166 additions and 239 deletions
|
|
@ -9,6 +9,7 @@ using LZ4;
|
|||
using MareSynchronos.API.Data;
|
||||
using MareSynchronos.API.Dto.Files;
|
||||
using MareSynchronos.API.Routes;
|
||||
using MareSynchronos.Mediator;
|
||||
using MareSynchronos.Utils;
|
||||
using MareSynchronos.WebAPI.Utils;
|
||||
using Microsoft.AspNetCore.SignalR.Client;
|
||||
|
|
@ -185,7 +186,7 @@ public partial class ApiController
|
|||
|
||||
public async Task DownloadFiles(int currentDownloadId, List<FileReplacementData> fileReplacementDto, CancellationToken ct)
|
||||
{
|
||||
DownloadStarted?.Invoke();
|
||||
_mediator.Publish(new HaltScanMessage("Download"));
|
||||
try
|
||||
{
|
||||
await DownloadFilesInternal(currentDownloadId, fileReplacementDto, ct).ConfigureAwait(false);
|
||||
|
|
@ -196,7 +197,7 @@ public partial class ApiController
|
|||
}
|
||||
finally
|
||||
{
|
||||
DownloadFinished?.Invoke();
|
||||
_mediator.Publish(new ResumeScanMessage("Download"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue