Skip to content

Commit 9185592

Browse files
committed
debugging debounced progress reporting
1 parent 93b199a commit 9185592

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Ui/App.fs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,12 @@ module App =
182182
let cacheFolder = Folder.GetPath Folders.cache
183183
let dataStore = JsonFileDataStore cacheFolder
184184
let youtube = Youtube(dataStore, VideoIndexRepository cacheFolder)
185-
let dispatchProgress = Cmd.debounce 100 (fun progress -> SearchProgress progress)
186-
command.SetProgressReporter(Progress<BatchProgress>(fun progress -> dispatchProgress progress |> List.iter (fun effect -> effect dispatch)))
185+
let dispatchProgress = Cmd.debounce 100 (fun progress ->
186+
System.Diagnostics.Debug.WriteLine("############# progress dispatched" + Environment.NewLine + progress.ToString())
187+
SearchProgress progress)
188+
command.SetProgressReporter(Progress<BatchProgress>(fun progress ->
189+
System.Diagnostics.Debug.WriteLine("############# progress reported" + Environment.NewLine + progress.ToString())
190+
dispatchProgress progress |> List.iter (fun effect -> effect dispatch)))
187191
CommandValidator.PrevalidateSearchCommand command
188192
use cts = new CancellationTokenSource()
189193
do! CommandValidator.ValidateScopesAsync(command, youtube, dataStore, cts.Token) |> Async.AwaitTask

0 commit comments

Comments
 (0)