mirror of
https://github.com/leiurayer/downkyi.git
synced 2025-04-02 07:30:38 +08:00
增加搜索功能
This commit is contained in:
parent
c18bd43819
commit
d0ba992d33
@ -188,7 +188,20 @@ namespace DownKyi.ViewModels
|
||||
private async void ExcuteInputSearchCommand() {
|
||||
await Task.Run(() =>
|
||||
{
|
||||
if (InputSearchText == null || InputSearchText == string.Empty) { return; }
|
||||
if (InputSearchText == null || InputSearchText == string.Empty) {
|
||||
PropertyChangeAsync(new Action(() =>
|
||||
{
|
||||
VideoSections = CaCheVideoSections;
|
||||
}));
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (VideoSection section in VideoSections)
|
||||
{
|
||||
var pages= section.VideoPages.Where(e=>e.Name.Contains(InputSearchText)).ToList();
|
||||
section.VideoPages = pages;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
@ -689,7 +702,7 @@ namespace DownKyi.ViewModels
|
||||
PropertyChangeAsync(new Action(() =>
|
||||
{
|
||||
VideoSections.AddRange(videoSections);
|
||||
CaCheVideoSections = VideoSections;
|
||||
CaCheVideoSections.AddRange(videoSections);
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user