From bc338c39a386096a428f881bfbb02326d3fc7275 Mon Sep 17 00:00:00 2001 From: molan-git <59296158+molan-git@users.noreply.github.com> Date: Thu, 16 Jan 2020 16:34:12 +0000 Subject: [PATCH] Fix for issue #4 Fixes ssue with empty profile page when clicking on username in toots. --- qml/pages/components/Toot.qml | 9 +++++---- qml/pages/components/VisualContainer.qml | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/qml/pages/components/Toot.qml b/qml/pages/components/Toot.qml index 88cd928..3c01f03 100644 --- a/qml/pages/components/Toot.qml +++ b/qml/pages/components/Toot.qml @@ -142,16 +142,17 @@ BackgroundItem { right: parent.right top: lblScreenName.bottom topMargin: Theme.paddingSmall - rightMargin: Theme.paddingLarge + rightMargin: Theme.paddingLarge } height: content.length ? paintedHeight : 0 onLinkActivated: { console.log(link) if (link[0] === "@") { pageStack.push(Qt.resolvedUrl("../Profile.qml"), { - "name": "", - "username": link.substring(1), - "profileImage": "" + "display_name": account_display_name, + "username": account_username, + "user_id": model.account_id, + "profileImage": account_avatar }) } else if (link[0] === "#") { diff --git a/qml/pages/components/VisualContainer.qml b/qml/pages/components/VisualContainer.qml index 8dacc90..95b0169 100644 --- a/qml/pages/components/VisualContainer.qml +++ b/qml/pages/components/VisualContainer.qml @@ -135,9 +135,10 @@ BackgroundItem { send(link) } else if (test.length === 4 && test[3][0] === "@" ) { pageStack.push(Qt.resolvedUrl("../Profile.qml"), { - "name": "", - "username": test[3].substring(1)+"@"+test[2], - "profileImage": "" + "display_name": account_display_name, + "username": account_username, + "user_id": model.account_id, + "profileImage": account_avatar }) } else { Qt.openUrlExternally(link);