fetchThreadData method
Retrieves thread information starting at since.
When you set setThreadSequences to true, then the
MimeMessage.threadSequence will be populated automatically for future
fetched messages.
Optionally specify the mailbox, in case not the currently selected
mailbox should be used.
Compare supportsThreading.
Implementation
Future<ThreadDataResult> fetchThreadData({
required DateTime since,
Mailbox? mailbox,
bool setThreadSequences = false,
}) {
final usedMailbox = mailbox ?? _selectedMailbox;
if (usedMailbox == null) {
throw InvalidArgumentException('no mailbox defined nor selected');
}
return _incomingLock.synchronized(
() => _incomingMailClient.fetchThreadData(
usedMailbox,
since,
setThreadSequences: setThreadSequences,
),
);
}