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 orientation: LayoutOrientation.LeftToRight
} }
Container { Container {
background: (theme === VisualStyle.Bright) ? Color.create("#e9e9e9") : Color.create("#282828")
WebImageView { WebImageView {
id: avatar id: avatar
url: ListItemData.user.content.avatar_image.link url: ListItemData.user.content.avatar_image.link
maxWidth: 100.0 maxWidth: ui.du(12)
maxHeight: avatar.maxWidth maxHeight: ui.du(12)
//imageSource: "asset:///icons/laughing_man.png" //imageSource: "asset:///icons/laughing_man.png"
} }
} }
@ -60,7 +61,14 @@ Container {
Container { Container {
Label { Label {
id: username 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
} }
} }
} }