TF-2305 Session::getOwnEmailAddress method to fetch the user email address from urn:ietf:params:jmap:principals imip mailto property if not present in the session username, which is the case for Cyrus

This commit is contained in:
Florent Azavant
2025-01-24 11:49:38 +01:00
committed by Dat H. Pham
parent 327af38fb0
commit 6720709a2e
23 changed files with 212 additions and 58 deletions
@@ -126,7 +126,7 @@ enum QuickSearchFilter {
BuildContext context,
SearchEmailFilter searchFilter,
EmailSortOrderType sortOrderType,
UserName? userName,
String? currentUserEmail,
) {
switch (this) {
case QuickSearchFilter.hasAttachment:
@@ -135,8 +135,8 @@ enum QuickSearchFilter {
return searchFilter.emailReceiveTimeType == EmailReceiveTimeType.last7Days;
case QuickSearchFilter.fromMe:
return searchFilter.from.length == 1 &&
userName?.value.isNotEmpty == true &&
userName?.value == searchFilter.from.first;
currentUserEmail?.isNotEmpty == true &&
currentUserEmail == searchFilter.from.first;
case QuickSearchFilter.sortBy:
return sortOrderType != EmailSortOrderType.mostRecent;
case QuickSearchFilter.dateTime: