Fix for issue #4
Fixes ssue with empty profile page when clicking on username in toots.
This commit is contained in:
parent
e99c500901
commit
bc338c39a3
2 changed files with 9 additions and 7 deletions
|
@ -142,16 +142,17 @@ BackgroundItem {
|
||||||
right: parent.right
|
right: parent.right
|
||||||
top: lblScreenName.bottom
|
top: lblScreenName.bottom
|
||||||
topMargin: Theme.paddingSmall
|
topMargin: Theme.paddingSmall
|
||||||
rightMargin: Theme.paddingLarge
|
rightMargin: Theme.paddingLarge
|
||||||
}
|
}
|
||||||
height: content.length ? paintedHeight : 0
|
height: content.length ? paintedHeight : 0
|
||||||
onLinkActivated: {
|
onLinkActivated: {
|
||||||
console.log(link)
|
console.log(link)
|
||||||
if (link[0] === "@") {
|
if (link[0] === "@") {
|
||||||
pageStack.push(Qt.resolvedUrl("../Profile.qml"), {
|
pageStack.push(Qt.resolvedUrl("../Profile.qml"), {
|
||||||
"name": "",
|
"display_name": account_display_name,
|
||||||
"username": link.substring(1),
|
"username": account_username,
|
||||||
"profileImage": ""
|
"user_id": model.account_id,
|
||||||
|
"profileImage": account_avatar
|
||||||
})
|
})
|
||||||
} else if (link[0] === "#") {
|
} else if (link[0] === "#") {
|
||||||
|
|
||||||
|
|
|
@ -135,9 +135,10 @@ BackgroundItem {
|
||||||
send(link)
|
send(link)
|
||||||
} else if (test.length === 4 && test[3][0] === "@" ) {
|
} else if (test.length === 4 && test[3][0] === "@" ) {
|
||||||
pageStack.push(Qt.resolvedUrl("../Profile.qml"), {
|
pageStack.push(Qt.resolvedUrl("../Profile.qml"), {
|
||||||
"name": "",
|
"display_name": account_display_name,
|
||||||
"username": test[3].substring(1)+"@"+test[2],
|
"username": account_username,
|
||||||
"profileImage": ""
|
"user_id": model.account_id,
|
||||||
|
"profileImage": account_avatar
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
Qt.openUrlExternally(link);
|
Qt.openUrlExternally(link);
|
||||||
|
|
Loading…
Reference in a new issue