Apply all the required styling in cpp
Apply all the required styling to show links, table, spoilers, etc in cpp. This also updates the method of revealing spoilers so now you can click to reveal then click again to hide.
This commit is contained in:
@@ -66,6 +66,22 @@ void MessageAttached::setContentModel(MessageContentModel *contentModel)
|
||||
Q_EMIT contentModelChanged();
|
||||
}
|
||||
|
||||
MessageContentFilterModel *MessageAttached::contentFilterModel() const
|
||||
{
|
||||
return m_contentFilterModel;
|
||||
}
|
||||
|
||||
void MessageAttached::setContentFilterModel(MessageContentFilterModel *contentFilterModel)
|
||||
{
|
||||
m_explicitContentFilterModel = true;
|
||||
if (m_contentFilterModel == contentFilterModel) {
|
||||
return;
|
||||
}
|
||||
m_contentFilterModel = contentFilterModel;
|
||||
propagateMessage(this);
|
||||
Q_EMIT contentFilterModelChanged();
|
||||
}
|
||||
|
||||
int MessageAttached::index() const
|
||||
{
|
||||
return m_index;
|
||||
@@ -147,6 +163,11 @@ void MessageAttached::propagateMessage(MessageAttached *message)
|
||||
Q_EMIT contentModelChanged();
|
||||
}
|
||||
|
||||
if (!m_explicitContentFilterModel && m_contentFilterModel != message->contentFilterModel()) {
|
||||
m_contentFilterModel = message->contentFilterModel();
|
||||
Q_EMIT contentFilterModelChanged();
|
||||
}
|
||||
|
||||
if (m_explicitIndex || m_index != message->index()) {
|
||||
m_index = message->index();
|
||||
Q_EMIT indexChanged();
|
||||
|
||||
Reference in New Issue
Block a user