ui logick of changing message, not connected yet

This commit is contained in:
Blue 2020-02-08 14:44:15 +03:00
parent ed56cca2e7
commit 6d1b83d0f8
18 changed files with 246 additions and 19 deletions

View file

@ -61,6 +61,19 @@ void Models::Presence::addMessage(const Shared::Message& data)
changed(4);
}
bool Models::Presence::changeMessage(const QString& id, const QMap<QString, QVariant>& data)
{
bool found = false;
for (Shared::Message& msg : messages) {
if (msg.getId() == id) {
msg.change(data);
found = true;
break;
}
}
return found;
}
void Models::Presence::dropMessages()
{
if (messages.size() > 0) {