disable data application and scanner in combat

This commit is contained in:
rootdarkarchon
2023-12-05 23:30:19 +01:00
parent bcf0d422b8
commit bd32a55ce5
13 changed files with 95 additions and 43 deletions

View File

@@ -65,7 +65,7 @@ public partial class FileDownloadManager : DisposableMediatorSubscriberBase
public async Task DownloadFiles(GameObjectHandler gameObject, List<FileReplacementData> fileReplacementDto, CancellationToken ct)
{
Mediator.Publish(new HaltScanMessage("Download"));
Mediator.Publish(new HaltScanMessage(nameof(DownloadFiles)));
try
{
await DownloadFilesInternal(gameObject, fileReplacementDto, ct).ConfigureAwait(false);
@@ -77,7 +77,7 @@ public partial class FileDownloadManager : DisposableMediatorSubscriberBase
finally
{
Mediator.Publish(new DownloadFinishedMessage(gameObject));
Mediator.Publish(new ResumeScanMessage("Download"));
Mediator.Publish(new ResumeScanMessage(nameof(DownloadFiles)));
}
}

View File

@@ -1,6 +1,4 @@
using Microsoft.Extensions.Logging;
namespace MareSynchronos.WebAPI.Files
namespace MareSynchronos.WebAPI.Files
{
/// <summary>
/// Class for streaming data with throttling support.