- Temp Fix Confict / Change F2 to F1

This commit is contained in:
DB p 2022-11-25 22:03:17 +09:00
parent 14bb856639
commit 00a4d62b22
3 changed files with 5 additions and 3 deletions

View file

@ -67,7 +67,7 @@
<system:String x:Key="ShouldUsePinyin">Search with Pinyin</system:String>
<system:String x:Key="ShouldUsePinyinToolTip">Allows using Pinyin to search. Pinyin is the standard system of romanized spelling for translating Chinese.</system:String>
<system:String x:Key="AlwaysPreview">Always open preview when start search</system:String>
<system:String x:Key="AlwaysPreviewToolTip">If uncheck, preview not showing when start launch. Please use F2 key
<system:String x:Key="AlwaysPreviewToolTip">If uncheck, preview not showing when start launch. Please use F1 key</system:String>
<system:String x:Key="shadowEffectNotAllowed">Shadow effect is not allowed while current theme has blur effect enabled</system:String>
<!-- Setting Plugin -->

View file

@ -619,7 +619,7 @@ namespace Flow.Launcher
}
}
break;
case Key.F2:
case Key.F1:
PreviewToggle();
e.Handled = true;
break;

View file

@ -202,8 +202,10 @@ namespace Flow.Launcher.ViewModel
private async ValueTask LoadPreviewImageAsync()
{
var imagePath = Result.PreviewImage ?? Result.IcoPath;
var loadFullImage = (Path.GetExtension(imagePath) ?? "").Equals(".url", StringComparison.OrdinalIgnoreCase);
// We need to modify the property not field here to trigger the OnPropertyChanged event
PreviewImage = await Task.Run(() => ImageLoader.Load(imagePath, true)).ConfigureAwait(false);
//PreviewImage = await Task.Run(() => ImageLoader.Load(imagePath, true)).ConfigureAwait(false);
PreviewImage = await ImageLoader.LoadAsync(imagePath, loadFullImage).ConfigureAwait(false);
}
public Result Result { get; }