Improved EmailModel handling

This commit is contained in:
the-djmaze 2023-02-12 18:28:30 +01:00
parent 57dc1d29b3
commit e8c93a1d0c
2 changed files with 6 additions and 15 deletions

View file

@ -162,12 +162,12 @@ export class MailMessageList extends AbstractViewRight {
let list = [], current, sort = FolderUserStore.sortMode() || 'DATE';
if (sort.includes('FROM')) {
MessagelistUserStore.forEach(msg => {
let email = msg.from?.[0].email;
let email = msg.from[0].email;
if (!current || email != current.id) {
current = {
id: email,
label: msg.from[0].toLine(),
search: 'from=' + msg.from[0].email,
search: 'from=' + email,
messages: []
};
list.push(current);