mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Text message "CTextMessageList::markedAsSent"
This commit is contained in:
@@ -150,6 +150,14 @@ namespace BlackMisc
|
||||
std::for_each(this->begin(), this->end(), [](CTextMessage & tm) { tm.markAsSent(); });
|
||||
}
|
||||
|
||||
CTextMessageList CTextMessageList::markedAsSent()
|
||||
{
|
||||
if (this->isEmpty()) { return {}; }
|
||||
CTextMessageList copy = *this;
|
||||
copy.markAsSent();
|
||||
return copy;
|
||||
}
|
||||
|
||||
void CTextMessageList::addConsolidatedTextMessage(const CTextMessage &message)
|
||||
{
|
||||
if (message.isEmpty()) { return; }
|
||||
|
||||
@@ -100,6 +100,9 @@ namespace BlackMisc
|
||||
//! Mark all messages as sent
|
||||
void markAsSent();
|
||||
|
||||
//! Marked as sent
|
||||
CTextMessageList markedAsSent();
|
||||
|
||||
//! Add a text message, but append it to an existing message if possible
|
||||
void addConsolidatedTextMessage(const CTextMessage &message);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user