From e3dc23de07e794d98af64a8f8333f65abe6c733b Mon Sep 17 00:00:00 2001 From: PeterZhong Date: Sun, 1 Jun 2025 23:47:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3Prompt=E6=89=BE=E4=B8=8D?= =?UTF-8?q?=E5=88=B0=E5=92=8C=E6=B5=8B=E8=AF=95=E8=BE=93=E5=87=BA=E4=B9=B1?= =?UTF-8?q?=E5=BA=8F=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LinkToolAddin.csproj | 8 +++++++- ui/dockpane/TestDockpane.xaml.cs | 9 +++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/LinkToolAddin.csproj b/LinkToolAddin.csproj index 35cdbec..0f3f990 100644 --- a/LinkToolAddin.csproj +++ b/LinkToolAddin.csproj @@ -113,7 +113,13 @@ Always - + + Always + + + + Always + diff --git a/ui/dockpane/TestDockpane.xaml.cs b/ui/dockpane/TestDockpane.xaml.cs index 267b7ea..e56dd29 100644 --- a/ui/dockpane/TestDockpane.xaml.cs +++ b/ui/dockpane/TestDockpane.xaml.cs @@ -229,16 +229,12 @@ namespace LinkToolAddin.ui.dockpane idList.Add(id); messageDict.TryAdd(msg.id, msg); } - Application.Current.Dispatcher.Invoke(() => - { - ReplyTextBox.Clear(); - }); try { StringBuilder builder = new StringBuilder(); - foreach (KeyValuePair pair in messageDict) + foreach (string idStr in idList) { - MessageListItem msgItem = pair.Value; + MessageListItem msgItem = messageDict[idStr]; string content = msgItem.content; if (msgItem.type == MessageType.REASON_MESSAGE) { @@ -249,6 +245,7 @@ namespace LinkToolAddin.ui.dockpane } Application.Current.Dispatcher.Invoke(() => { + ReplyTextBox.Clear(); ReplyTextBox.Text = builder.ToString(); ReplyTextBox.ScrollToEnd(); });