diff --git a/STranslate/ViewModels/Preference/HistoryViewModel.cs b/STranslate/ViewModels/Preference/HistoryViewModel.cs index 7476f05f..d9374b40 100644 --- a/STranslate/ViewModels/Preference/HistoryViewModel.cs +++ b/STranslate/ViewModels/Preference/HistoryViewModel.cs @@ -30,9 +30,9 @@ public HistoryViewModel() /// 2. 在搜索过程中 /// 3. view列表总数等于数据库总数 /// - private bool CanLoadHistory => !IsLoading && string.IsNullOrEmpty(SearchContent) && (Count == 0 || HistoryList.Count != Count); + public bool CanLoadHistory => !IsLoading && string.IsNullOrEmpty(SearchContent) && (Count == 0 || HistoryList.Count != Count); - [RelayCommand(CanExecute = nameof(CanLoadHistory))] + [RelayCommand] private async Task LoadMoreHistoryAsync(ScrollViewer? scroll) { IsLoading = true; diff --git a/STranslate/Views/Preference/HistoryPage.xaml b/STranslate/Views/Preference/HistoryPage.xaml index 10b6a457..26d1a513 100644 --- a/STranslate/Views/Preference/HistoryPage.xaml +++ b/STranslate/Views/Preference/HistoryPage.xaml @@ -61,7 +61,7 @@ SelectedIndex="{Binding SelectedIndex}"> -