Fix showing Location events
- Initialize required properties - Use event's body as display
This commit is contained in:
committed by
Tobias Fella
parent
9b65ae1e66
commit
62a770b3e2
@@ -41,6 +41,8 @@ ColumnLayout {
|
||||
*/
|
||||
required property var componentAttributes
|
||||
|
||||
required property int index
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.maximumWidth: Message.maxContentWidth
|
||||
|
||||
@@ -124,5 +126,7 @@ ColumnLayout {
|
||||
author: root.author
|
||||
display: root.display
|
||||
visible: root.display !== ""
|
||||
index: root.index
|
||||
componentAttributes: root.componentAttributes
|
||||
}
|
||||
}
|
||||
|
||||
@@ -448,7 +448,7 @@ QList<MessageComponent> EventMessageContentModel::componentsForType(MessageCompo
|
||||
}
|
||||
case MessageComponentType::Location:
|
||||
return {MessageComponent{type,
|
||||
QString(),
|
||||
EventHandler::plainBody(m_room, event.first),
|
||||
{
|
||||
{u"latitude"_s, EventHandler::latitude(event.first)},
|
||||
{u"longitude"_s, EventHandler::longitude(event.first)},
|
||||
|
||||
Reference in New Issue
Block a user