Search query length now at least 4 characters
This commit is contained in:
parent
b8bf7bdf30
commit
e564be08f5
@ -414,8 +414,10 @@ public static class Tranga_Cli
|
|||||||
private static void SearchTasks(TaskManager taskManager, Logger logger)
|
private static void SearchTasks(TaskManager taskManager, Logger logger)
|
||||||
{
|
{
|
||||||
logger.WriteLine("Tranga_CLI", "Menu: Search task");
|
logger.WriteLine("Tranga_CLI", "Menu: Search task");
|
||||||
|
Console.Clear();
|
||||||
|
Console.WriteLine("Enter search query:");
|
||||||
string? query = Console.ReadLine();
|
string? query = Console.ReadLine();
|
||||||
while (query is null || query.Length < 1)
|
while (query is null || query.Length < 4)
|
||||||
query = Console.ReadLine();
|
query = Console.ReadLine();
|
||||||
PrintTasks(taskManager.GetAllTasks().Where(qTask =>
|
PrintTasks(taskManager.GetAllTasks().Where(qTask =>
|
||||||
qTask.ToString().ToLower().Contains(query, StringComparison.OrdinalIgnoreCase)).ToArray(), logger);
|
qTask.ToString().ToLower().Contains(query, StringComparison.OrdinalIgnoreCase)).ToArray(), logger);
|
||||||
|
Loading…
Reference in New Issue
Block a user