pal resourse sticking, notifications of unread messages, new message icons

This commit is contained in:
Blue 2021-04-27 22:29:15 +03:00
parent 4c5efad9dc
commit b44873d587
12 changed files with 119 additions and 95 deletions

View file

@ -71,15 +71,14 @@ Shared::Message Chat::createMessage() const
return msg;
}
// TODO
// void Chat::addMessage(const Shared::Message& data)
// {
// Conversation::addMessage(data);
//
// if (!data.getOutgoing()) { //TODO need to check if that was the last message
// const QString& res = data.getPenPalResource();
// if (res.size() > 0) {
// setPalResource(res);
// }
// }
// }
void Chat::onMessage(const Shared::Message& data)
{
Conversation::onMessage(data);
if (!data.getOutgoing()) {
const QString& res = data.getPenPalResource();
if (res.size() > 0) {
setPalResource(res);
}
}
}