forked from blue/squawk
edit icon next to the message showing if the message was edited and what was there a first
This commit is contained in:
parent
3f1fba4de2
commit
5f925217fc
4 changed files with 84 additions and 7 deletions
|
@ -262,7 +262,7 @@ QVariant Models::MessageFeed::data(const QModelIndex& index, int role) const
|
|||
answer = static_cast<unsigned int>(msg->getState());
|
||||
break;
|
||||
case Correction:
|
||||
answer = msg->getEdited();
|
||||
answer.setValue(fillCorrection(*msg));;
|
||||
break;
|
||||
case SentByMe:
|
||||
answer = sentByMe(*msg);
|
||||
|
@ -311,7 +311,7 @@ QVariant Models::MessageFeed::data(const QModelIndex& index, int role) const
|
|||
item.date = msg->getTime();
|
||||
item.state = msg->getState();
|
||||
item.error = msg->getErrorText();
|
||||
item.correction = msg->getEdited();
|
||||
item.correction = fillCorrection(*msg);
|
||||
|
||||
QString body = msg->getBody();
|
||||
if (body != msg->getOutOfBandUrl()) {
|
||||
|
@ -480,6 +480,14 @@ Models::Attachment Models::MessageFeed::fillAttach(const Shared::Message& msg) c
|
|||
return att;
|
||||
}
|
||||
|
||||
Models::Edition Models::MessageFeed::fillCorrection(const Shared::Message& msg) const
|
||||
{
|
||||
::Models::Edition ed({msg.getEdited(), msg.getOriginalBody(), msg.getLastModified()});
|
||||
|
||||
return ed;
|
||||
}
|
||||
|
||||
|
||||
void Models::MessageFeed::downloadAttachment(const QString& messageId)
|
||||
{
|
||||
bool notify = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue