mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-15 11:14:16 +01:00
potentially fix mac, fix cancel downloads
This commit is contained in:
parent
1a1aa5cac5
commit
085d918397
3 changed files with 30 additions and 13 deletions
|
|
@ -43,7 +43,7 @@ public class CachedPlayer
|
|||
}
|
||||
}
|
||||
|
||||
private CancellationTokenSource _downloadCancellationTokenSource = new();
|
||||
private CancellationTokenSource? _downloadCancellationTokenSource;
|
||||
|
||||
private string _lastGlamourerData = string.Empty;
|
||||
|
||||
|
|
@ -93,9 +93,12 @@ public class CachedPlayer
|
|||
await _apiController.DownloadFiles(toDownloadReplacements, downloadToken);
|
||||
}
|
||||
|
||||
if (_downloadCancellationTokenSource.Token.IsCancellationRequested)
|
||||
if (downloadToken.IsCancellationRequested)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
ApplyCharacterData(e.CharacterData, moddedPaths);
|
||||
ApplyCharacterData(e.CharacterData, moddedPaths);
|
||||
}, downloadToken);
|
||||
}
|
||||
|
||||
|
|
@ -152,6 +155,7 @@ public class CachedPlayer
|
|||
{
|
||||
Logger.Debug("Restoring state for " + PlayerName);
|
||||
IsVisible = false;
|
||||
_downloadCancellationTokenSource?.Dispose();
|
||||
_watcher.RemovePlayerFromWatch(PlayerName);
|
||||
_ipcManager.PenumbraRemoveTemporaryCollection(PlayerName);
|
||||
_ipcManager.GlamourerRevertCharacterCustomization(PlayerName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue