Adapt useritem to use NetImageManager

This commit is contained in:
Morgan McMillian 2017-11-16 13:11:26 -08:00
parent b7dc358c33
commit 1307bb2f2a

View file

@ -1,5 +1,5 @@
import bb.cascades 1.4 import bb.cascades 1.4
import org.labsquare 1.0 import com.netimage 1.0
Container { Container {
id: useritem id: useritem
@ -20,12 +20,24 @@ Container {
Container { Container {
minWidth: ui.du(12) minWidth: ui.du(12)
background: (theme === VisualStyle.Bright) ? Color.create("#e9e9e9") : Color.create("#282828") background: (theme === VisualStyle.Bright) ? Color.create("#e9e9e9") : Color.create("#282828")
WebImageView { ImageView {
id: avatar id: avatar
url: ListItemData.content.avatar_image.link //url: ListItemData.content.avatar_image.link
maxWidth: ui.du(12) maxWidth: ui.du(12)
maxHeight: ui.du(12) maxHeight: ui.du(12)
//imageSource: "asset:///icons/laughing_man.png" //imageSource: "asset:///icons/laughing_man.png"
image: aimgtracker.image
attachedObjects: [
NetImageTracker {
id: aimgtracker
manager: imgManager
source: ListItemData.content.avatar_image.link
},
NetImageManager {
id: imgManager
cacheId: "feedImageManager"
}
]
} }
} }
Container { Container {