mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T190, text messages can be appended
(same sender sends one message in multiple parts)
This commit is contained in:
@@ -109,5 +109,14 @@ namespace BlackMisc
|
||||
std::for_each(this->begin(), this->end(), [](CTextMessage & tm) { tm.markAsSent(); });
|
||||
}
|
||||
|
||||
void CTextMessageList::addConsolidatedTextMessage(const CTextMessage &message)
|
||||
{
|
||||
if (message.isEmpty()) { return; }
|
||||
for (CTextMessage &tm : *this)
|
||||
{
|
||||
if (tm.appendIfPossible(message)) { return; }
|
||||
}
|
||||
this->push_back(message);
|
||||
}
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user