fix build

This commit is contained in:
Lightczx
2024-04-16 15:53:41 +08:00
parent f682bb57e8
commit 80d6d5eb2b
2 changed files with 7 additions and 7 deletions

View File

@@ -28,21 +28,20 @@ internal sealed class HutaoException : Exception
{
if (!condition)
{
throw new HutaoException(kind, message, innerException);
throw new HutaoException(message, innerException);
}
}
[DoesNotReturn]
public static HutaoException GachaStatisticsInvalidItemId(uint id, Exception? innerException = default)
{
string message = SH.FormatServiceGachaStatisticsFactoryItemIdInvalid(id);
throw new HutaoException(HutaoExceptionKind.GachaStatisticsInvalidItemId, message, innerException);
throw new HutaoException(SH.FormatServiceGachaStatisticsFactoryItemIdInvalid(id), innerException);
}
[DoesNotReturn]
public static HutaoException UserdataCorrupted(string message, Exception? innerException = default)
{
throw new HutaoException(HutaoExceptionKind.UserdataCorrupted, message, innerException);
throw new HutaoException(message, innerException);
}
[DoesNotReturn]

View File

@@ -4,6 +4,7 @@
using Snap.Hutao.Model.Primitive;
using Snap.Hutao.Service.Achievement;
using Snap.Hutao.Service.Metadata;
using Snap.Hutao.Service.Metadata.ContextAbstraction;
namespace Snap.Hutao.ViewModel.Achievement;
@@ -31,12 +32,12 @@ internal sealed partial class AchievementViewModelSlim : Abstraction.ViewModelSl
if (await metadataService.InitializeAsync().ConfigureAwait(false))
{
Dictionary<AchievementId, Model.Metadata.Achievement.Achievement> achievementMap = await metadataService
.GetIdToAchievementMapAsync()
AchievementServiceMetadataContext context = await metadataService
.GetContextAsync<AchievementServiceMetadataContext>()
.ConfigureAwait(false);
List<AchievementStatistics> list = await scope.ServiceProvider
.GetRequiredService<IAchievementStatisticsService>()
.GetAchievementStatisticsAsync(achievementMap)
.GetAchievementStatisticsAsync(context)
.ConfigureAwait(false);
await taskContext.SwitchToMainThreadAsync();