Only list tasks that are enqueued when showing remove task menu

This commit is contained in:
glax 2023-05-21 03:06:50 +02:00
parent ca2d13226f
commit 2910473fec

View File

@ -184,7 +184,7 @@ public static class Tranga_Cli
Console.Clear();
logger.WriteLine("Tranga_CLI", "Menu: Remove Task from queue");
TrangaTask[] tasks = taskManager.GetAllTasks();
TrangaTask[] tasks = taskManager.GetAllTasks().Where(rTask => rTask.state is TrangaTask.ExecutionState.Enqueued).ToArray();
if (tasks.Length < 1)
{
Console.Clear();