mirror of
https://jihulab.com/DGP-Studio/Snap.Hutao.git
synced 2025-11-19 21:02:53 +08:00
fix dailynote refresh time notify
This commit is contained in:
@@ -136,6 +136,6 @@ internal sealed class DailyNoteEntry : ObservableObject, IMappingFrom<DailyNoteE
|
|||||||
OnPropertyChanged(nameof(DailyNote));
|
OnPropertyChanged(nameof(DailyNote));
|
||||||
|
|
||||||
RefreshTime = DateTimeOffset.Now;
|
RefreshTime = DateTimeOffset.Now;
|
||||||
OnPropertyChanged(nameof(RefreshTime));
|
OnPropertyChanged(nameof(RefreshTimeFormatted));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2643,6 +2643,15 @@ namespace Snap.Hutao.Resource.Localization {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 正在获取实时便笺信息,请稍候 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
internal static string ViewModelDailyNoteRequestProgressTitle {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("ViewModelDailyNoteRequestProgressTitle", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 成功保存到指定位置 的本地化字符串。
|
/// 查找类似 成功保存到指定位置 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1034,6 +1034,9 @@
|
|||||||
<data name="ViewModelDailyNoteRegisterTaskFail" xml:space="preserve">
|
<data name="ViewModelDailyNoteRegisterTaskFail" xml:space="preserve">
|
||||||
<value>注册计划任务失败,请使用管理员模式重试</value>
|
<value>注册计划任务失败,请使用管理员模式重试</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ViewModelDailyNoteRequestProgressTitle" xml:space="preserve">
|
||||||
|
<value>正在获取实时便笺信息,请稍候</value>
|
||||||
|
</data>
|
||||||
<data name="ViewModelExportSuccessMessage" xml:space="preserve">
|
<data name="ViewModelExportSuccessMessage" xml:space="preserve">
|
||||||
<value>成功保存到指定位置</value>
|
<value>成功保存到指定位置</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -255,10 +255,6 @@
|
|||||||
</PackageReference>
|
</PackageReference>
|
||||||
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="7.0.0" />
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.7.30">
|
|
||||||
<PrivateAssets>all</PrivateAssets>
|
|
||||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
|
||||||
</PackageReference>
|
|
||||||
<PackageReference Include="Microsoft.VisualStudio.Validation" Version="17.6.11" />
|
<PackageReference Include="Microsoft.VisualStudio.Validation" Version="17.6.11" />
|
||||||
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.18-beta">
|
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.18-beta">
|
||||||
<PrivateAssets>all</PrivateAssets>
|
<PrivateAssets>all</PrivateAssets>
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
// Copyright (c) DGP Studio. All rights reserved.
|
// Copyright (c) DGP Studio. All rights reserved.
|
||||||
// Licensed under the MIT license.
|
// Licensed under the MIT license.
|
||||||
|
|
||||||
|
using Microsoft.UI.Xaml.Controls;
|
||||||
|
using Snap.Hutao.Control.Extension;
|
||||||
using Snap.Hutao.Core;
|
using Snap.Hutao.Core;
|
||||||
using Snap.Hutao.Factory.Abstraction;
|
using Snap.Hutao.Factory.Abstraction;
|
||||||
using Snap.Hutao.Model.Entity;
|
using Snap.Hutao.Model.Entity;
|
||||||
@@ -88,10 +90,17 @@ internal sealed partial class DailyNoteViewModel : Abstraction.ViewModel
|
|||||||
private async Task TrackRoleAsync(UserAndUid? userAndUid)
|
private async Task TrackRoleAsync(UserAndUid? userAndUid)
|
||||||
{
|
{
|
||||||
if (userAndUid is not null)
|
if (userAndUid is not null)
|
||||||
|
{
|
||||||
|
ContentDialog dialog = await contentDialogFactory
|
||||||
|
.CreateForIndeterminateProgressAsync(SH.ViewModelDailyNoteRequestProgressTitle)
|
||||||
|
.ConfigureAwait(false);
|
||||||
|
|
||||||
|
using (await dialog.BlockAsync(taskContext).ConfigureAwait(false))
|
||||||
{
|
{
|
||||||
await dailyNoteService.AddDailyNoteAsync(userAndUid).ConfigureAwait(false);
|
await dailyNoteService.AddDailyNoteAsync(userAndUid).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[Command("RefreshCommand")]
|
[Command("RefreshCommand")]
|
||||||
private async Task RefreshAsync()
|
private async Task RefreshAsync()
|
||||||
|
|||||||
Reference in New Issue
Block a user