From ee9e0b0444c451abf6deeac556b2c2e9bcb8e2ae Mon Sep 17 00:00:00 2001 From: Noi Date: Sun, 7 Jul 2024 23:41:06 -0700 Subject: [PATCH] Add to-do list comments This comes after several hours of attempting to implement what the first line suggests. A join in this situation is quite difficult and the importance of this feature does not outweigh the potentially high resource use of any other possible solutions for making it happen. For now, at least. --- ApplicationCommands/TzAutocompleteHandler.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ApplicationCommands/TzAutocompleteHandler.cs b/ApplicationCommands/TzAutocompleteHandler.cs index 089d77d..dd016b4 100644 --- a/ApplicationCommands/TzAutocompleteHandler.cs +++ b/ApplicationCommands/TzAutocompleteHandler.cs @@ -21,7 +21,8 @@ public class TzAutocompleteHandler : AutocompleteHandler { query = query.Where(u => EF.Functions.ILike(u.TimeZone!, $"%{input}%/%") || EF.Functions.ILike(u.TimeZone!, $"%/%{input}%")); } - // TODO Should also find a way to include zones with counts of 0 for full completion (with a join, maybe) + // TODO Could find a way to include all remaining zones at the bottom of results for full completion + // TODO Filter out undesirable zone names, aliases, etc from autocompletion var result = query.GroupBy(u => u.TimeZone) .Select(g => new { ZoneName = g.Key, Count = g.Count() }) .OrderByDescending(x => x.Count)