mirror of
https://github.com/2dust/v2rayN.git
synced 2026-04-18 13:35:47 +00:00
Compare commits
No commits in common. "5c4761697f7150842cf104faee41fcc59f12223e" and "be311ddb19bd40e6ad3a39e4c539d3b061292c64" have entirely different histories.
5c4761697f
...
be311ddb19
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