diff --git a/assets/PostItem.qml b/assets/PostItem.qml index bde8abd..0bde87e 100644 --- a/assets/PostItem.qml +++ b/assets/PostItem.qml @@ -29,7 +29,6 @@ Container { rightPadding: ui.sdu(3.0) topPadding: ui.sdu(2.0) //bottomPadding: ui.sdu(2.0) - property string lorem: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse non enim tellus. Donec vestibulum enim urna, eget faucibus diam commodo a. Donec eget hendrerit metus. Pellentesque vehicula nisi nec vehicula ullamcorper. Aliquam a elit eget mi fringilla porta fermentum eget eros. Phasellus vestibulum nulla sed elit congue adipiscing. Cras imperdiet urna ac ipsum volutpat lobortis. Maecenas vehicula tortor at viverra convallis. Curabitur nibh massa, tristique id felis ut, venenatis faucibus dui. Donec fringilla, mi nec tincidunt dignissim, neque nunc semper mi, quis rutrum diam turpis sit amet erat. Cras a sodales nisi. Nunc sit amet diam sed lectus molestie cursus convallis et erat. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Duis vitae varius leo. Mauris eu leo a nunc bibendum rutrum euismod et ipsum. " property variant theme : Application.themeSupport.theme.colorTheme.style @@ -144,6 +143,22 @@ Container { navigation.focusPolicy: NavigationFocusPolicy.NotFocusable } } + Container { + horizontalAlignment: HorizontalAlignment.Center + bottomMargin: ui.sdu(2.0) + WebImageView { + url: { + var oembed = "" + ListItemData.raw.forEach(function (item) { + if (item["type"] == "io.pnut.core.oembed") { + oembed = item["value"]["url"] + } + }) + return oembed + } + scalingMethod: ScalingMethod.AspectFit + } + } Container { layout: DockLayout {} horizontalAlignment: HorizontalAlignment.Fill diff --git a/src/Pnut.cpp b/src/Pnut.cpp index 9737c48..b92f6d2 100644 --- a/src/Pnut.cpp +++ b/src/Pnut.cpp @@ -335,6 +335,7 @@ void Pnut::getStream(QString endpoint, Pnut::RequestType rtype) QUrl url(PNUT_API_ROOT + endpoint); KQOAuthParameters parameters; parameters.insert("count", "50"); + parameters.insert("include_raw", "1"); switch (rtype) { case Pnut::STREAM_NEWER: @@ -400,6 +401,7 @@ void Pnut::getThread(QString pid) { QUrl url(PNUT_API_ROOT + "/posts/" + pid + "/thread"); KQOAuthParameters parameters; + parameters.insert("include_raw", "1"); req_map[++req_id] = ":thread"; getRequest(url, parameters, req_id); } diff --git a/translations/Goober.ts b/translations/Goober.ts index 4e6cc43..e0f4432 100644 --- a/translations/Goober.ts +++ b/translations/Goober.ts @@ -30,47 +30,47 @@ PostItem - + Reply - + Reply All - + Add Bookmark - + Delete Bookmark - + Repost - + Delete Repost - + Quote - + View Profile - + Delete