mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Merge branch 'development' into feature/gh-actions
This commit is contained in:
commit
5f206436c3
9 files changed
+44
-25
No files matched your search
@@ -48,8 +48,11 @@ public class LogsDebugViewModel : ActivatableViewModelBase
|
||||
});
|
||||
}
|
||||
|
||||
private void AddLogEvent(LogEvent logEvent)
|
||||
private void AddLogEvent(LogEvent? logEvent)
|
||||
{
|
||||
if (logEvent is null)
|
||||
return;
|
||||
|
||||
using StringWriter writer = new();
|
||||
_formatter.Format(logEvent, writer);
|
||||
string line = writer.ToString();
|
||||
@@ -60,7 +63,7 @@ public class LogsDebugViewModel : ActivatableViewModelBase
|
||||
|
||||
private void RemoveOldestLine()
|
||||
{
|
||||
int firstNewLine = Document.Text.IndexOf('\n');
|
||||
int firstNewLine = Document.IndexOf('\n', 0, Document.TextLength);
|
||||
if (firstNewLine == -1)
|
||||
{
|
||||
//this should never happen.
|
||||
|
||||
Reference in new issue
Block a user