mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-21 05:54:36 +00:00
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.
This commit is contained in:
parent
30ac9886d5
commit
ee9e0b0444
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue