revert for QueryHistory and UserSelectedRecord saved on search (#19164)

This commit is contained in:
Davide Giacometti
2022-07-19 13:56:27 +02:00
committed by GitHub
parent 31fd6258e0
commit 915663e7db

View File

@@ -197,26 +197,8 @@ namespace PowerLauncher.ViewModel
if (SelectedIsFromQueryResults()) if (SelectedIsFromQueryResults())
{ {
// todo: revert _userSelectedRecordStorage.Save() and _historyItemsStorage.Save() after https://github.com/microsoft/PowerToys/issues/9164 is done
_userSelectedRecord.Add(result); _userSelectedRecord.Add(result);
try
{
_userSelectedRecordStorage.Save();
}
catch (UnauthorizedAccessException ex)
{
Log.Warn($"Failed to save file. ${ex.Message}", this.GetType());
}
_history.Add(result.OriginQuery.RawQuery); _history.Add(result.OriginQuery.RawQuery);
try
{
_historyItemsStorage.Save();
}
catch (UnauthorizedAccessException ex)
{
Log.Warn($"Failed to save file. ${ex.Message}", this.GetType());
}
} }
else else
{ {