reintroduce cleanup function

This commit is contained in:
Florian Stinglmayr 2022-11-25 18:06:30 +01:00
parent 027f8a892d
commit 0be9791abc

View File

@ -6,6 +6,7 @@ using System.Windows;
using Microsoft.Win32; using Microsoft.Win32;
using EDPlayerJournal.Entries; using EDPlayerJournal.Entries;
using EliteBGS.Util; using EliteBGS.Util;
using EDPlayerJournal.BGS;
namespace EliteBGS; namespace EliteBGS;
@ -85,6 +86,8 @@ public partial class LoadEntriesWindow : Window {
return; return;
} }
TransactionParser parser = new();
try { try {
List<Entry> entries = new List<Entry>(); List<Entry> entries = new List<Entry>();
@ -93,8 +96,10 @@ public partial class LoadEntriesWindow : Window {
continue; continue;
} }
Entry entry = Entry.Parse(line); Entry entry = Entry.Parse(line);
if (parser.IsRelevant(entry)) {
entries.Add(entry); entries.Add(entry);
} }
}
if (entries.Count <= 0) { if (entries.Count <= 0) {
return; return;