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()