Bug with the edited message fixed, some further work on message correction

This commit is contained in:
Blue 2022-03-27 22:05:31 +03:00
parent 0823b35148
commit bf4a27f35d
Signed by untrusted user: blue
GPG key ID: 9B203B252A63EE38
6 changed files with 61 additions and 3 deletions

View file

@ -224,8 +224,20 @@ std::set<Models::MessageFeed::MessageRoles> Models::MessageFeed::detectChanges(c
void Models::MessageFeed::removeMessage(const QString& id)
{
//todo;
}
Shared::Message Models::MessageFeed::getMessage(const QString& id)
{
StorageById::iterator itr = indexById.find(id);
if (itr == indexById.end()) {
throw NotFound(id.toStdString(), rosterItem->getJid().toStdString(), rosterItem->getAccountName().toStdString());
}
return **itr;
}
QVariant Models::MessageFeed::data(const QModelIndex& index, int role) const
{
int i = index.row();