mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix bugs
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/microsoft/CsWin32/main/src/Microsoft.Windows.CsWin32/settings.schema.json",
|
||||
"allowMarshaling": true,
|
||||
"useSafeHandles": false,
|
||||
"emitSingleFile": true
|
||||
"useSafeHandles": false
|
||||
}
|
||||
@@ -10,8 +10,8 @@ internal struct ContentDialogHideToken : IDisposable, IAsyncDisposable
|
||||
private readonly ContentDialog contentDialog;
|
||||
private readonly ITaskContext taskContext;
|
||||
|
||||
private bool disposed = false;
|
||||
private bool disposing = false;
|
||||
private bool disposed = false;
|
||||
|
||||
public ContentDialogHideToken(ContentDialog contentDialog, ITaskContext taskContext)
|
||||
{
|
||||
|
||||
@@ -105,8 +105,12 @@ internal static class SummaryHelper
|
||||
/// <returns>分数</returns>
|
||||
public static float GetPercentSubAffixScore(in ReliquarySubAffixId appendId)
|
||||
{
|
||||
// 圣遗物相同类型副词条强化档位一共为 4 档
|
||||
// 恰好为 70% 80% 90% 100%
|
||||
// 圣遗物相同类型副词条强化档位一共为 4/3/2 档
|
||||
// 五星 为 70% 80% 90% 100%
|
||||
// 四星 为 70% 80% 90% 100%
|
||||
// 三星 为 70% 80% 90% 100%
|
||||
// 二星 为 70% 85% 100%
|
||||
// 二星 为 80% 100%
|
||||
// 通过计算与最大属性的 Id 差来决定当前副词条的强化档位
|
||||
uint maxId = GetAffixMaxId(appendId);
|
||||
uint delta = maxId - appendId;
|
||||
@@ -119,7 +123,11 @@ internal static class SummaryHelper
|
||||
(5 or 4 or 3, 3) => 70F,
|
||||
|
||||
(2, 0) => 100F,
|
||||
(2, 1) => 80F,
|
||||
(2, 1) => 85F,
|
||||
(2, 2) => 70F,
|
||||
|
||||
(1, 0) => 100F,
|
||||
(1, 1) => 80F,
|
||||
|
||||
_ => throw Must.NeverHappen($"Unexpected AppendId: {appendId.Value} Delta: {delta}"),
|
||||
};
|
||||
|
||||
@@ -14,6 +14,7 @@ using Snap.Hutao.Service.GachaLog.QueryProvider;
|
||||
using Snap.Hutao.Service.Notification;
|
||||
using Snap.Hutao.View.Dialog;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.InteropServices;
|
||||
using Windows.Storage.Pickers;
|
||||
|
||||
namespace Snap.Hutao.ViewModel.GachaLog;
|
||||
@@ -144,7 +145,23 @@ internal sealed partial class GachaLogViewModel : Abstraction.ViewModel
|
||||
RefreshStrategy strategy = IsAggressiveRefresh ? RefreshStrategy.AggressiveMerge : RefreshStrategy.LazyMerge;
|
||||
|
||||
GachaLogRefreshProgressDialog dialog = await contentDialogFactory.CreateInstanceAsync<GachaLogRefreshProgressDialog>().ConfigureAwait(false);
|
||||
ContentDialogHideToken hideToken = await dialog.BlockAsync(taskContext).ConfigureAwait(false);
|
||||
|
||||
ContentDialogHideToken hideToken;
|
||||
try
|
||||
{
|
||||
hideToken = await dialog.BlockAsync(taskContext).ConfigureAwait(false);
|
||||
}
|
||||
catch (COMException ex)
|
||||
{
|
||||
if (ex.HResult == unchecked((int)0x80000019))
|
||||
{
|
||||
infoBarService.Error(ex);
|
||||
return;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
IProgress<GachaLogFetchStatus> progress = taskContext.CreateProgressForMainThread<GachaLogFetchStatus>(dialog.OnReport);
|
||||
bool authkeyValid;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user