[SMS App] Use helper rather than hard-coding MessageTypeSent in the code

This commit is contained in:
Simon Redman 2020-05-29 19:58:12 -07:00
parent 60bf200723
commit 70c712808f

View file

@ -139,7 +139,7 @@ void ConversationModel::createRowFromMessage(const ConversationMessage& message,
auto item = new QStandardItem;
item->setText(displayBody);
item->setData(message.type() == ConversationMessage::MessageTypeSent, FromMeRole);
item->setData(message.isOutgoing(), FromMeRole);
item->setData(message.date(), DateRole);
item->setData(senderName, SenderRole);
insertRow(pos, item);