mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix build
This commit is contained in:
@@ -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]
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user