Fix for issue #4

Fixes ssue with empty profile page when clicking on username in toots.
This commit is contained in:
molan-git 2020-01-16 16:34:12 +00:00 committed by GitHub
parent e99c500901
commit bc338c39a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 7 deletions

View file

@ -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] === "#") {

View file

@ -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);