mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 21:07:21 +01:00
cancel download on visibility change
This commit is contained in:
parent
973a378979
commit
222e8bb888
1 changed files with 3 additions and 1 deletions
|
|
@ -420,6 +420,8 @@ public sealed class PairHandler : DisposableMediatorSubscriberBase
|
|||
{
|
||||
IsVisible = false;
|
||||
_charaHandler?.Invalidate();
|
||||
_downloadCancellationTokenSource?.CancelDispose();
|
||||
_downloadCancellationTokenSource = null;
|
||||
MediatorUnsubscribeFromCharacterChanged();
|
||||
Logger.LogTrace("{this} visibility changed, now: {visi}", this, IsVisible);
|
||||
}
|
||||
|
|
@ -453,7 +455,7 @@ public sealed class PairHandler : DisposableMediatorSubscriberBase
|
|||
_redrawCts.CancelAfter(TimeSpan.FromSeconds(30));
|
||||
var token = _redrawCts.Token;
|
||||
|
||||
Task.Run(async () =>
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
var applicationId = Guid.NewGuid();
|
||||
await _dalamudUtil.WaitWhileCharacterIsDrawing(Logger, _charaHandler!, applicationId, ct: token).ConfigureAwait(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue