feat(compose): sort address autocomplete by most recently used
Add ORDER BY receivedAt DESC to the searchAddresses query so the first unique occurrence of each address comes from the newest email. Contacts from recent conversations float to the top of the suggestions list. Add a unit test verifying the sort order. Fixes #83 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
05abc121df
commit
99c3a1d808
@@ -2614,6 +2614,7 @@ class EmailRepositoryImpl implements EmailRepository {
|
||||
t.ccJson.like(pattern));
|
||||
return cond;
|
||||
})
|
||||
..orderBy([(t) => OrderingTerm.desc(t.receivedAt)])
|
||||
..limit(100))
|
||||
.get();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user