[PTRun]Don't clear config data on upgrade (#30187)

* [PTRun] Implemented a new JSON storage method for PTRun settings files.

* [PTRun] Removed uncessary parts.

* [PTRun] Spell checks.

* [PTRun] New JsonSerializerOptions added for information files.

* [PTRun] Unnecessary null check is removed.

* [PT Run] - ExtractFields function removed.
- Creating instance is used instead of deserializing.

* [PTRun] Build fix

* [PTRun] Removed unncessary parts

* [PTRun] CheckWithInformationFileToClear reversed.

* [PTRun] Build fix.

* [PTRun] Deserialization is used instead of key by key comparison.

* [PTRun] Removed unncessary parts.

* [PTRun] Removed unncessary parts.

* [PTRun] Remove entry if query is null or empty.
This commit is contained in:
gokcekantarci
2024-02-06 18:33:19 +03:00
committed by GitHub
parent 4426df671e
commit 1c7c100a42
7 changed files with 174 additions and 28 deletions

View File

@@ -41,5 +41,23 @@ namespace PowerLauncher.Storage
});
}
}
public void Update()
{
for (int i = Items.Count - 1; i >= 0; i--)
{
if (string.IsNullOrEmpty(Items[i].Query))
{
Items.RemoveAt(i);
}
else
{
if (Items[i].ExecutedDateTime == DateTime.MinValue)
{
Items[i].ExecutedDateTime = DateTime.Now;
}
}
}
}
}
}