mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user