TF-4195 Add Label to Thread

This commit is contained in:
dab246
2026-01-06 12:35:13 +07:00
committed by Dat H. Pham
parent ef1efc9310
commit 94fd6f8071
34 changed files with 829 additions and 40 deletions
@@ -16,4 +16,21 @@ extension PresentationEmailMapExtension on Map<EmailId, PresentationEmail?> {
}
return newMap;
}
Map<EmailId, PresentationEmail?> toggleListEmailsKeywordByIds({
required List<EmailId> emailIds,
required KeyWordIdentifier keyword,
required bool remove,
}) {
final updatedMap = Map<EmailId, PresentationEmail?>.from(this);
for (final emailId in emailIds) {
final email = updatedMap[emailId];
if (email == null) continue;
updatedMap[emailId] = email.toggleKeyword(keyword, remove);
}
return updatedMap;
}
}