Skip to content

Commit 56a3551

Browse files
committed
Fix performance issue
1 parent 96bb07d commit 56a3551

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1456,23 +1456,23 @@ private void BuildQuery(IEnumerable<BaseBuiltinShortcutModel> builtInShortcuts,
14561456

14571457
foreach (var shortcut in builtInShortcuts)
14581458
{
1459-
string expansion;
1460-
if (shortcut is BuiltinShortcutModel syncShortcut)
1461-
{
1462-
expansion = syncShortcut.Expand();
1463-
}
1464-
else if (shortcut is AsyncBuiltinShortcutModel asyncShortcut)
1465-
{
1466-
expansion = App.JTF.Run(() => asyncShortcut.ExpandAsync());
1467-
}
1468-
else
1469-
{
1470-
continue;
1471-
}
14721459
try
14731460
{
14741461
if (customExpanded.Contains(shortcut.Key))
14751462
{
1463+
string expansion;
1464+
if (shortcut is BuiltinShortcutModel syncShortcut)
1465+
{
1466+
expansion = syncShortcut.Expand();
1467+
}
1468+
else if (shortcut is AsyncBuiltinShortcutModel asyncShortcut)
1469+
{
1470+
expansion = App.JTF.Run(() => asyncShortcut.ExpandAsync());
1471+
}
1472+
else
1473+
{
1474+
continue;
1475+
}
14761476
queryBuilder.Replace(shortcut.Key, expansion);
14771477
queryBuilderTmp.Replace(shortcut.Key, expansion);
14781478
queryChanged = true;

0 commit comments

Comments
 (0)