We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2026bb7 commit 905a97dCopy full SHA for 905a97d
Flow.Launcher/ViewModel/MainViewModel.cs
@@ -194,6 +194,8 @@ public MainViewModel()
194
_ = RegisterClockAndDateUpdateAsync();
195
}
196
197
+ private int cancelIndex = 0;
198
+
199
private void RegisterViewUpdate()
200
{
201
var resultUpdateChannel = Channel.CreateUnbounded<ResultsForUpdate>();
@@ -212,6 +214,17 @@ async Task UpdateActionAsync()
212
214
await Task.Delay(20);
213
215
while (channelReader.TryRead(out var item))
216
217
+ if (item.shouldClearExistingResults)
218
+ {
219
+ cancelIndex++;
220
+ if (cancelIndex > 1)
221
222
+ // Assume one task for clearing existing results is cancelled
223
+ continue;
224
+ }
225
226
227
228
if (!item.Token.IsCancellationRequested)
229
queue[item.ID] = item;
230
0 commit comments