mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-11-27 14:59:16 +08:00
revert for QueryHistory and UserSelectedRecord saved on search (#19164)
This commit is contained in:
parent
31fd6258e0
commit
915663e7db
@ -197,26 +197,8 @@ namespace PowerLauncher.ViewModel
|
||||
|
||||
if (SelectedIsFromQueryResults())
|
||||
{
|
||||
// todo: revert _userSelectedRecordStorage.Save() and _historyItemsStorage.Save() after https://github.com/microsoft/PowerToys/issues/9164 is done
|
||||
_userSelectedRecord.Add(result);
|
||||
try
|
||||
{
|
||||
_userSelectedRecordStorage.Save();
|
||||
}
|
||||
catch (UnauthorizedAccessException ex)
|
||||
{
|
||||
Log.Warn($"Failed to save file. ${ex.Message}", this.GetType());
|
||||
}
|
||||
|
||||
_history.Add(result.OriginQuery.RawQuery);
|
||||
try
|
||||
{
|
||||
_historyItemsStorage.Save();
|
||||
}
|
||||
catch (UnauthorizedAccessException ex)
|
||||
{
|
||||
Log.Warn($"Failed to save file. ${ex.Message}", this.GetType());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user