Skip to content

Commit 76dfe38

Browse files
committed
Add test codes
1 parent e4ecea0 commit 76dfe38

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Flow.Launcher/ViewModel/MainViewModel.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,14 +1341,22 @@ async Task QueryTaskAsync(PluginPair plugin, CancellationToken token)
13411341
if (token.IsCancellationRequested) return;
13421342
}
13431343

1344+
App.API.LogDebug(ClassName, $"1");
1345+
13441346
// Since it is wrapped within a ThreadPool Thread, the synchronous context is null
13451347
// Task.Yield will force it to run in ThreadPool
13461348
await Task.Yield();
13471349

1350+
App.API.LogDebug(ClassName, $"2");
1351+
13481352
var results = await PluginManager.QueryForPluginAsync(plugin, query, token);
13491353

1354+
App.API.LogDebug(ClassName, $"3");
1355+
13501356
if (token.IsCancellationRequested) return;
13511357

1358+
App.API.LogDebug(ClassName, $"4");
1359+
13521360
IReadOnlyList<Result> resultsCopy;
13531361
if (results == null)
13541362
{
@@ -1360,6 +1368,8 @@ async Task QueryTaskAsync(PluginPair plugin, CancellationToken token)
13601368
resultsCopy = DeepCloneResults(results, token);
13611369
}
13621370

1371+
App.API.LogDebug(ClassName, $"5");
1372+
13631373
foreach (var result in resultsCopy)
13641374
{
13651375
if (string.IsNullOrEmpty(result.BadgeIcoPath))
@@ -1368,6 +1378,8 @@ async Task QueryTaskAsync(PluginPair plugin, CancellationToken token)
13681378
}
13691379
}
13701380

1381+
App.API.LogDebug(ClassName, $"6");
1382+
13711383
if (token.IsCancellationRequested) return;
13721384

13731385
App.API.LogDebug(ClassName, $"Update results for plugin <{plugin.Metadata.Name}>");

0 commit comments

Comments
 (0)