mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-16 12:35:46 +00:00
Compare commits
1 commit
104864acb1
...
8932ed71ab
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8932ed71ab |
1 changed files with 3 additions and 13 deletions
|
|
@ -86,25 +86,15 @@ public class MsgViewModel : MyReactiveObject
|
|||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
EnqueueWithLimit(ex.Message);
|
||||
_queueMsg.Enqueue(ex.Message);
|
||||
_lastMsgFilterNotAvailable = true;
|
||||
}
|
||||
}
|
||||
|
||||
EnqueueWithLimit(msg);
|
||||
_queueMsg.Enqueue(msg);
|
||||
if (!msg.EndsWith(Environment.NewLine))
|
||||
{
|
||||
EnqueueWithLimit(Environment.NewLine);
|
||||
}
|
||||
}
|
||||
|
||||
private void EnqueueWithLimit(string item)
|
||||
{
|
||||
_queueMsg.Enqueue(item);
|
||||
|
||||
while (_queueMsg.Count > NumMaxMsg)
|
||||
{
|
||||
_queueMsg.TryDequeue(out _);
|
||||
_queueMsg.Enqueue(Environment.NewLine);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue