mirror of
https://github.com/2dust/v2rayN.git
synced 2026-05-13 17:45:50 +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)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
EnqueueWithLimit(ex.Message);
|
_queueMsg.Enqueue(ex.Message);
|
||||||
_lastMsgFilterNotAvailable = true;
|
_lastMsgFilterNotAvailable = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
EnqueueWithLimit(msg);
|
_queueMsg.Enqueue(msg);
|
||||||
if (!msg.EndsWith(Environment.NewLine))
|
if (!msg.EndsWith(Environment.NewLine))
|
||||||
{
|
{
|
||||||
EnqueueWithLimit(Environment.NewLine);
|
_queueMsg.Enqueue(Environment.NewLine);
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void EnqueueWithLimit(string item)
|
|
||||||
{
|
|
||||||
_queueMsg.Enqueue(item);
|
|
||||||
|
|
||||||
while (_queueMsg.Count > NumMaxMsg)
|
|
||||||
{
|
|
||||||
_queueMsg.TryDequeue(out _);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue