Restore web page preview

This commit is contained in:
Sebastian Wolf 2020-11-03 08:18:46 +01:00
parent 1b345a6654
commit fd74da2408

View file

@ -647,14 +647,14 @@ Page {
running: false running: false
onTriggered: { onTriggered: {
if (typeof display.content !== "undefined") { if (typeof display.content !== "undefined") {
if(messageListItem.extraContentComponentName !== "") { if (messageListItem.extraContentComponentName !== "") {
extraContentLoader.setSource( extraContentLoader.setSource(
"../components/" +messageListItem.extraContentComponentName +".qml", "../components/" +messageListItem.extraContentComponentName +".qml",
{ {
messageListItem: messageListItem messageListItem: messageListItem
}) })
} else { } else {
if(typeof display.content.web_page !== "undefined") { // only in messageText if (typeof display.content.web_page !== "undefined") { // only in messageText
webPagePreviewLoader.active = true; webPagePreviewLoader.active = true;
} }
} }
@ -848,7 +848,7 @@ Page {
active: false active: false
asynchronous: true asynchronous: true
width: parent.width width: parent.width
height: messageListItem.containsWebPage ? ( (parent.width * 2 / 3) + (6 * Theme.fontSizeExtraSmall) + ( 7 * Theme.paddingSmall) ) : 0 height: typeof display.content.web_page !== "undefined" ? ( (parent.width * 2 / 3) + (6 * Theme.fontSizeExtraSmall) + ( 7 * Theme.paddingSmall) ) : 0
sourceComponent: Component { sourceComponent: Component {
id: webPagePreviewComponent id: webPagePreviewComponent
@ -859,7 +859,7 @@ Page {
webPagePreviewLoader.height = webPagePreview.implicitHeight; webPagePreviewLoader.height = webPagePreview.implicitHeight;
} }
webPageData: messageListItem.containsWebPage ? display.content.web_page : "" webPageData: display.content.web_page
width: parent.width width: parent.width
} }
} }