From 942a552c8ebd3bc8547e2341c11151897b8d301c Mon Sep 17 00:00:00 2001 From: glax Date: Sun, 21 May 2023 15:26:29 +0200 Subject: [PATCH] Reduced update time for more responsiveness in CLI Added statement "Exiting." when exiting for feedback to userinput. --- Tranga-CLI/Tranga_Cli.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tranga-CLI/Tranga_Cli.cs b/Tranga-CLI/Tranga_Cli.cs index e4759f6..c1865fc 100644 --- a/Tranga-CLI/Tranga_Cli.cs +++ b/Tranga-CLI/Tranga_Cli.cs @@ -97,7 +97,6 @@ public static class Tranga_Cli if (Console.KeyAvailable) { - selection = Console.ReadKey().Key; switch (selection) { case ConsoleKey.L: @@ -156,10 +155,13 @@ public static class Tranga_Cli } PrintMenu(taskManager, taskManager.settings.downloadLocation, logger); } - Thread.Sleep(1000); + Thread.Sleep(200); + selection = Console.ReadKey().Key; } logger.WriteLine("Tranga_CLI", "Exiting."); + Console.Clear(); + Console.WriteLine("Exiting."); if (taskManager.GetAllTasks().Any(task => task.state == TrangaTask.ExecutionState.Running)) { Console.WriteLine("Force quit (Even with running tasks?) y/N");