diff --git a/Core/ViewModel/SearchWindowViewModel.cs b/Core/ViewModel/SearchWindowViewModel.cs index 456b0b8..0540048 100644 --- a/Core/ViewModel/SearchWindowViewModel.cs +++ b/Core/ViewModel/SearchWindowViewModel.cs @@ -513,6 +513,7 @@ partial void OnSearchChanged(string? value) } Items.Add(searchViewItem); // 添加元素 + searchViewItem.Notify(); count++; // 计数器加一 } } diff --git a/KitopiaAvalonia/Converter/SearchWindow/ItemNameMatchCtr.cs b/KitopiaAvalonia/Converter/SearchWindow/ItemNameMatchCtr.cs index 4c1cfe5..09aa9a7 100644 --- a/KitopiaAvalonia/Converter/SearchWindow/ItemNameMatchCtr.cs +++ b/KitopiaAvalonia/Converter/SearchWindow/ItemNameMatchCtr.cs @@ -20,10 +20,10 @@ public class ItemNameMatchCtr : IValueConverter return new InlineCollection(); } - InlineCollection list = new(); - if (str.PinyinItem == null || str.PinyinItem.CharMatchResults == null || str.PinyinItem.SplitWords == null || - str.PinyinItem.CharMatchResults.Length - str.PinyinItem.ZhongWenCount != str.PinyinItem.SplitWords.Length || - str.PinyinItem.CharMatchResults.Length == 0) + InlineCollection list = new(); if (str.PinyinItem == null || str.PinyinItem.CharMatchResults == null || str.PinyinItem.SplitWords == null || + str.PinyinItem.CharMatchResults.Length == 0|| + str.PinyinItem.CharMatchResults.Length /2 != str.PinyinItem.SplitWords.Length + ) { list.Add(new Run(str.ItemDisplayName)); return list; @@ -33,7 +33,7 @@ public class ItemNameMatchCtr : IValueConverter for (int i = 0; i < str.PinyinItem.SplitWords.Length; i++) { var inline = new Run(str.PinyinItem.SplitWords[i]); - if (str.PinyinItem.CharMatchResults[i + str.PinyinItem.ZhongWenCount]) + if (str.PinyinItem.CharMatchResults[i + str.PinyinItem.SplitWords.Length]) { inline.Foreground = Brushes.OrangeRed; } diff --git a/KitopiaAvalonia/Windows/SearchWindow.axaml b/KitopiaAvalonia/Windows/SearchWindow.axaml index bef3bdb..d7feeb4 100644 --- a/KitopiaAvalonia/Windows/SearchWindow.axaml +++ b/KitopiaAvalonia/Windows/SearchWindow.axaml @@ -154,7 +154,7 @@ HorizontalAlignment="Stretch"> (this, "SearchWindowClose", (_, _) => { Dispatcher.UIThread.InvokeAsync(() => { IsVisible = false; }); }); + #if DEBUG + this.Topmost = false; + #endif } public override void Show() diff --git a/PinyinM.NET b/PinyinM.NET index 641fd83..b8bb357 160000 --- a/PinyinM.NET +++ b/PinyinM.NET @@ -1 +1 @@ -Subproject commit 641fd83df57f0ad6fa127316d81329a00f8a7dd3 +Subproject commit b8bb3575bdbe1cc868362f2c12aea5a31f8e1677 diff --git a/PluginCore b/PluginCore index e1bdf5d..15c43df 160000 --- a/PluginCore +++ b/PluginCore @@ -1 +1 @@ -Subproject commit e1bdf5d5fe940d3a5b9d96563f3949b1db6f11d1 +Subproject commit 15c43df415ba6af43492b3e142dc0c1dbe7f3284