Skip to content

Commit 49486a0

Browse files
committed
chore
1 parent d9975bc commit 49486a0

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

BetterLyrics.WinUI3/App.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ private async Task InitAppServicesAsync()
133133
// 预加载系统字体列表
134134
await FontHelper.GetSystemFontFamiliesAsync();
135135

136+
// 启动周期更新检测
136137
var appUpdateService = Ioc.Default.GetRequiredService<IAppUpdateService>();
137138
appUpdateService.StartDailyCheck();
138139
}

BetterLyrics.WinUI3/Controls/AboutControl.xaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,10 @@
9393
<controls:SettingsCard.Header>
9494
<TextBlock x:Uid="AboutControlLastCheckTime" />
9595
</controls:SettingsCard.Header>
96-
<Button x:Uid="AboutControlCheckUpdate" Command="{x:Bind ViewModel.CheckAppUpdateCommand}" />
96+
<Button
97+
x:Uid="AboutControlCheckUpdate"
98+
Command="{x:Bind ViewModel.CheckAppUpdateCommand}"
99+
IsEnabled="{x:Bind ViewModel.AppUpdateService.IsChecking, Mode=OneWay, Converter={StaticResource BoolNegationConverter}}" />
97100
</controls:SettingsCard>
98101
</controls:SettingsExpander.Items>
99102
<controls:SettingsExpander.ItemsHeader>
@@ -122,6 +125,7 @@
122125
Severity="Error"
123126
Visibility="{x:Bind ViewModel.AppUpdateService.AppUpdateStatus, Mode=OneWay, Converter={StaticResource EnumToVisibilityConverter}, ConverterParameter=2}" />
124127
<ProgressBar
128+
Margin="0,2,0,0"
125129
VerticalAlignment="Top"
126130
IsIndeterminate="True"
127131
Visibility="{x:Bind ViewModel.AppUpdateService.IsChecking, Mode=OneWay, Converter={StaticResource BoolToVisibilityConverter}}" />

BetterLyrics.WinUI3/ViewModels/AboutControlViewModel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ private static async Task OpenAppStorePageAsync()
150150
}
151151

152152
[RelayCommand]
153-
private async Task CheckAppUpdateAsync()
153+
private void CheckAppUpdate()
154154
{
155-
await AppUpdateService.UpdateAvailabilityAsync();
155+
_ = AppUpdateService.UpdateAvailabilityAsync();
156156
}
157157

158158
}

0 commit comments

Comments
 (0)