Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions Flow.Launcher/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -841,15 +841,20 @@ private Query ConstructQuery(string queryText, IEnumerable<CustomShortcutModel>
queryBuilder.Replace('@' + shortcut.Key, shortcut.Expand());
}

string customExpanded = queryBuilder.ToString();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although I feel like this is somewhat weird....I consider it's ok


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)
{
Expand Down