fix avatar display and setup link to user profile

This commit is contained in:
Morgan McMillian 2016-10-21 06:09:02 -07:00
parent d1336f9de5
commit d8fc66aa1e

View file

@ -40,11 +40,12 @@ Container {
orientation: LayoutOrientation.LeftToRight
}
Container {
background: (theme === VisualStyle.Bright) ? Color.create("#e9e9e9") : Color.create("#282828")
WebImageView {
id: avatar
url: ListItemData.user.content.avatar_image.link
maxWidth: 100.0
maxHeight: avatar.maxWidth
maxWidth: ui.du(12)
maxHeight: ui.du(12)
//imageSource: "asset:///icons/laughing_man.png"
}
}
@ -60,7 +61,14 @@ Container {
Container {
Label {
id: username
text: ListItemData.user.username
text: "<a href=\"#profile\">" + ListItemData.user.username + "</a>"
activeTextHandler: ActiveTextHandler {
onTriggered: {
console.log("duh: " + ListItemData.user.username)
postitem.ListItem.view.viewProfile(ListItemData.user)
}
}
textFormat: TextFormat.Html
}
}
}