From baee72a2fa25088214a0fcf09b30460bb3faeaf4 Mon Sep 17 00:00:00 2001 From: DismissedLight <1686188646@qq.com> Date: Sat, 19 Aug 2023 20:33:32 +0800 Subject: [PATCH] fix gachastatistics pullprediction infobar spam --- .../Snap.Hutao/Service/GachaLog/Factory/PullPrediction.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/Factory/PullPrediction.cs b/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/Factory/PullPrediction.cs index dfe63e32..80df0613 100644 --- a/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/Factory/PullPrediction.cs +++ b/src/Snap.Hutao/Snap.Hutao/Service/GachaLog/Factory/PullPrediction.cs @@ -28,9 +28,9 @@ internal sealed class PullPrediction await context.TaskContext.SwitchToBackgroundAsync(); Response response = await context.GetGachaDistributionAsync().ConfigureAwait(false); - if (response.IsOk()) + if (response is { ReturnCode: 0, Data: GachaDistribution data }) { - PredictResult result = PredictCore(response.Data.Distribution, typedWishSummary); + PredictResult result = PredictCore(data.Distribution, typedWishSummary); await barrier.SignalAndWaitAsync().ConfigureAwait(false); await context.TaskContext.SwitchToMainThreadAsync();