mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Merge pull request #1786 from VictoriousRaptor/ExpandShortcutsWhenNeeded
Expand builtin shortcuts when needed
This commit is contained in:
commit
29282e47d9
1 changed files with 8 additions and 3 deletions
|
|
@ -841,15 +841,20 @@ namespace Flow.Launcher.ViewModel
|
|||
queryBuilder.Replace('@' + shortcut.Key, shortcut.Expand());
|
||||
}
|
||||
|
||||
string customExpanded = queryBuilder.ToString();
|
||||
|
||||
Application.Current.Dispatcher.Invoke(() =>
|
||||
{
|
||||
foreach (var shortcut in builtInShortcuts)
|
||||
{
|
||||
try
|
||||
{
|
||||
var expansion = shortcut.Expand();
|
||||
queryBuilder.Replace(shortcut.Key, expansion);
|
||||
queryBuilderTmp.Replace(shortcut.Key, expansion);
|
||||
if (customExpanded.Contains(shortcut.Key))
|
||||
{
|
||||
var expansion = shortcut.Expand();
|
||||
queryBuilder.Replace(shortcut.Key, expansion);
|
||||
queryBuilderTmp.Replace(shortcut.Key, expansion);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue