mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
revert for QueryHistory and UserSelectedRecord saved on search (#19164)
This commit is contained in:
committed by
GitHub
parent
31fd6258e0
commit
915663e7db
@@ -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
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user