Skip to content

Commit

Permalink
fixed sample OnDownloadProgressChanged
Browse files Browse the repository at this point in the history
  • Loading branch information
bezzad committed Sep 17, 2024
1 parent 307f676 commit 38f29bc
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/Samples/Downloader.Sample/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -286,14 +286,8 @@ private static void OnDownloadProgressChanged(object sender, DownloadProgressCha
ConsoleProgress.Tick((int)(e.ProgressPercentage * 100));
if (sender is DownloadService ds)
{
if (OperatingSystem.IsWindows())
{
Console.Title = e.UpdateTitleInfo(ds.IsPaused);
}
else
{
ConsoleProgress.Message = e.UpdateTitleInfo(ds.IsPaused);
}
var title = e.UpdateTitleInfo(ds.IsPaused);
ConsoleProgress.Message = title;
}
}
}

0 comments on commit 38f29bc

Please sign in to comment.