mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[Settings] Do not try to apply profile settings if there was a timeout (#16933)
This commit is contained in:
@@ -273,16 +273,23 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
}
|
||||
});
|
||||
|
||||
t.Wait(1000, ts.Token);
|
||||
var completedInTime = t.Wait(3000, ts.Token);
|
||||
ts.Cancel();
|
||||
ts.Dispose();
|
||||
|
||||
if (!readSuccessfully)
|
||||
if (readSuccessfully)
|
||||
{
|
||||
FilterRemapKeysList(_profile?.RemapKeys?.InProcessRemapKeys);
|
||||
}
|
||||
else
|
||||
{
|
||||
success = false;
|
||||
}
|
||||
|
||||
FilterRemapKeysList(_profile?.RemapKeys?.InProcessRemapKeys);
|
||||
if (!completedInTime)
|
||||
{
|
||||
Logger.LogError($"Timeout encountered when loading {PowerToyName} profile");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -291,6 +298,11 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
|
||||
success = false;
|
||||
}
|
||||
|
||||
if (!success)
|
||||
{
|
||||
Logger.LogError($"Couldn't load {PowerToyName} profile");
|
||||
}
|
||||
|
||||
return success;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user