interaction: set body and transferStatus of DATA_TRANSFER messages
This patch adds code in the interaction::Info::init function so that the "body" and "transferStatus" fields are always set when an Info struct is constructed for a message of type DATA_TRANSFER. This removes some code duplication in conversationmodel.cpp, where these fields were being set as an extra step after construction in three different places. It also fixes a bug in the ConversationModelPimpl::slotMessageUpdated function, which did *not* set the "body" of DATA_TRANSFER messages. The body was therefore empty instead of containing a file path, which is what caused the image preview bug described in the following issue: GitLab: #1671 The patch also reverts a change that was made in the MessageListModel::update function by commit d2eba1d9. This change was a workaround for the above bug, but it is no longer necessary (and it broke message deletion, which relies on the body of the deleted message being set to the empty string). GitLab: #1825 Change-Id: I5848b93a12c1ef7b3735c5c6db6b32a9bbc4041d
Loading