From 03d5b7a05b36ef002ed2439e703539e290444cdd Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Fri, 26 Sep 2025 17:11:48 +0800 Subject: [PATCH] Bug fix --- v2rayN/v2rayN.Desktop/Views/MsgView.axaml.cs | 6 +----- v2rayN/v2rayN/Views/MsgView.xaml.cs | 4 ---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/v2rayN/v2rayN.Desktop/Views/MsgView.axaml.cs b/v2rayN/v2rayN.Desktop/Views/MsgView.axaml.cs index 6a279284..a49253c3 100644 --- a/v2rayN/v2rayN.Desktop/Views/MsgView.axaml.cs +++ b/v2rayN/v2rayN.Desktop/Views/MsgView.axaml.cs @@ -46,8 +46,6 @@ public partial class MsgView : ReactiveUserControl private void ShowMsg(object msg) { - txtMsg.BeginChange(); - //var lineCount = txtMsg.LineCount; //if (lineCount > ViewModel?.NumMaxMsg) //{ @@ -64,13 +62,11 @@ public partial class MsgView : ReactiveUserControl { txtMsg.ScrollToEnd(); } - - txtMsg.EndChange(); } public void ClearMsg() { - txtMsg.Text = string.Empty; + txtMsg.Clear(); txtMsg.AppendText("----- Message cleared -----\n"); } diff --git a/v2rayN/v2rayN/Views/MsgView.xaml.cs b/v2rayN/v2rayN/Views/MsgView.xaml.cs index af8eb5f4..449597cc 100644 --- a/v2rayN/v2rayN/Views/MsgView.xaml.cs +++ b/v2rayN/v2rayN/Views/MsgView.xaml.cs @@ -47,8 +47,6 @@ public partial class MsgView private void ShowMsg(object msg) { - txtMsg.BeginChange(); - if (txtMsg.LineCount > ViewModel?.NumMaxMsg) { ClearMsg(); @@ -59,8 +57,6 @@ public partial class MsgView { txtMsg.ScrollToEnd(); } - - txtMsg.EndChange(); } public void ClearMsg()