This commit is contained in:
JustArchi 2018-10-02 23:26:26 +02:00
parent 03ffabb9af
commit 0a59976df4
2 changed files with 4 additions and 7 deletions

View file

@ -1810,9 +1810,6 @@ namespace ArchiSteamFarm {
// Return early if this update doesn't bring anything new
if (callback.LicenseList.Count == OwnedPackageIDs.Count) {
if (callback.LicenseList.All(license => OwnedPackageIDs.ContainsKey(license.PackageID))) {
// Wait 2 seconds for eventual PlayingSessionStateCallback or SharedLibraryLockStatusCallback
await Task.Delay(2000).ConfigureAwait(false);
if (!await CardsFarmer.Resume(false).ConfigureAwait(false)) {
await ResetGamesPlayed().ConfigureAwait(false);
}
@ -1845,9 +1842,6 @@ namespace ArchiSteamFarm {
ArchiLogger.LogGenericInfo(Strings.Done);
}
// Wait a second for eventual PlayingSessionStateCallback or SharedLibraryLockStatusCallback
await Task.Delay(1000).ConfigureAwait(false);
if (CardsFarmer.Paused) {
await ResetGamesPlayed().ConfigureAwait(false);
}

View file

@ -211,7 +211,10 @@ namespace ArchiSteamFarm {
return true;
}
internal void SetInitialState(bool paused) => PermanentlyPaused = Paused = paused;
internal void SetInitialState(bool paused) {
PermanentlyPaused = Paused = paused;
ShouldResumeFarming = true;
}
internal async Task StartFarming() {
if (NowFarming || Paused || !Bot.IsPlayingPossible) {