diff --git a/gui/chatblockmodel.cpp b/gui/chatblockmodel.cpp index f5f974b..69a46da 100644 --- a/gui/chatblockmodel.cpp +++ b/gui/chatblockmodel.cpp @@ -759,6 +759,12 @@ void ChatBlockModel::processLine(const QString &line) case State::BlockEnd: // [[[end]]] closes the current block if (s_endRe.match(line).hasMatch()) { + // Emit final update so QML picks up the completed segment state. + if (!m_blocks.isEmpty()) { + int blockIndex = m_blocks.size() - 1; + QModelIndex idx = index(blockIndex); + emit dataChanged(idx, idx, {ContentRole, RenderedHtmlRole, SegmentsRole}); + } m_state = State::BlockStart; return; }