mirror of
https://github.com/tutao/tutanota.git
synced 2025-12-08 06:09:50 +00:00
Order conversation entries by mail receivedDate in ConversationViewer
Close #9937
This commit is contained in:
parent
2a55c74a4b
commit
93bdbaeada
1 changed files with 4 additions and 0 deletions
|
|
@ -25,6 +25,7 @@ import { ListAutoSelectBehavior, MailListDisplayMode } from "../../../common/mis
|
||||||
import { MailModel } from "../model/MailModel.js"
|
import { MailModel } from "../model/MailModel.js"
|
||||||
|
|
||||||
import { isOfTypeOrSubfolderOf } from "../model/MailChecks.js"
|
import { isOfTypeOrSubfolderOf } from "../model/MailChecks.js"
|
||||||
|
import { compareMails } from "../model/MailUtils"
|
||||||
|
|
||||||
export type MailViewerViewModelFactory = (options: CreateMailViewerOptions) => MailViewerViewModel
|
export type MailViewerViewModelFactory = (options: CreateMailViewerOptions) => MailViewerViewModel
|
||||||
|
|
||||||
|
|
@ -254,6 +255,9 @@ export class ConversationViewModel {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// conversation is sorted by mail's receivedDate, because we do not recreate the conversationEntry once a draft is sent.
|
||||||
|
// without sorting, the ordering would be based on when the draft was created, not when it was sent.
|
||||||
|
newConversation.sort((a, b) => compareMails(b.viewModel.mail, a.viewModel.mail))
|
||||||
return newConversation
|
return newConversation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue