fix images on thread page

This commit is contained in:
Morgan McMillian 2017-11-16 11:57:07 -08:00
parent baf15b623a
commit 3ec3521b38
3 changed files with 22 additions and 27 deletions

View file

@ -18,7 +18,6 @@
*/ */
import bb.cascades 1.4 import bb.cascades 1.4
import org.labsquare 1.0
import com.netimage 1.0 import com.netimage 1.0
import "moment.js" as Moment import "moment.js" as Moment
import "parser.js" as Parser import "parser.js" as Parser
@ -48,7 +47,6 @@ Container {
background: (theme === VisualStyle.Bright) ? Color.create("#e9e9e9") : Color.create("#282828") background: (theme === VisualStyle.Bright) ? Color.create("#e9e9e9") : Color.create("#282828")
ImageView { ImageView {
id: avatar id: avatar
//url: ListItemData.user.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"
@ -157,17 +155,6 @@ Container {
horizontalAlignment: HorizontalAlignment.Center horizontalAlignment: HorizontalAlignment.Center
bottomMargin: ui.sdu(2.0) bottomMargin: ui.sdu(2.0)
ImageView { ImageView {
// url: {
// var oembed = ""
// if (typeof ListItemData.raw !== "undefined") {
// ListItemData.raw.forEach(function (item) {
// if (item["type"] == "io.pnut.core.oembed") {
// oembed = item["value"]["thumbnail_url"]
// }
// })
// }
// return oembed
// }
visible: { visible: {
var isphoto = false var isphoto = false
if (typeof ListItemData.raw !== "undefined") { if (typeof ListItemData.raw !== "undefined") {

View file

@ -18,6 +18,7 @@
*/ */
import bb.cascades 1.4 import bb.cascades 1.4
import com.netimage 1.0
Page { Page {
@ -31,6 +32,7 @@ Page {
Container { Container {
ListView { ListView {
id: threadView id: threadView
property variant listImageManager: feedImageManager
dataModel: ArrayDataModel { dataModel: ArrayDataModel {
id: threadModel id: threadModel
} }
@ -64,6 +66,12 @@ Page {
return false return false
} }
} }
attachedObjects: [
NetImageManager {
id: feedImageManager
cacheId: "feedImageManager"
}
]
} }
} }

View file

@ -43,52 +43,52 @@
<context> <context>
<name>PostItem</name> <name>PostItem</name>
<message> <message>
<location filename="../assets/PostItem.qml" line="233"/> <location filename="../assets/PostItem.qml" line="220"/>
<source>Reply</source> <source>Reply</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="242"/> <location filename="../assets/PostItem.qml" line="229"/>
<source>Reply All</source> <source>Reply All</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="252"/> <location filename="../assets/PostItem.qml" line="239"/>
<source>Delete Bookmark</source> <source>Delete Bookmark</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="252"/> <location filename="../assets/PostItem.qml" line="239"/>
<source>Add Bookmark</source> <source>Add Bookmark</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="263"/> <location filename="../assets/PostItem.qml" line="250"/>
<source>Delete Repost</source> <source>Delete Repost</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="263"/> <location filename="../assets/PostItem.qml" line="250"/>
<source>Repost</source> <source>Repost</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="274"/> <location filename="../assets/PostItem.qml" line="261"/>
<source>Quote</source> <source>Quote</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="283"/> <location filename="../assets/PostItem.qml" line="270"/>
<source>View Profile</source> <source>View Profile</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="290"/> <location filename="../assets/PostItem.qml" line="277"/>
<source>Copy text</source> <source>Copy text</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/PostItem.qml" line="320"/> <location filename="../assets/PostItem.qml" line="307"/>
<source>Delete</source> <source>Delete</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
@ -203,22 +203,22 @@
<context> <context>
<name>StreamTab</name> <name>StreamTab</name>
<message> <message>
<location filename="../assets/StreamTab.qml" line="161"/> <location filename="../assets/StreamTab.qml" line="157"/>
<source>New Post</source> <source>New Post</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/StreamTab.qml" line="175"/> <location filename="../assets/StreamTab.qml" line="171"/>
<source>To Top</source> <source>To Top</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/StreamTab.qml" line="203"/> <location filename="../assets/StreamTab.qml" line="199"/>
<source>To Bottom</source> <source>To Bottom</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../assets/StreamTab.qml" line="190"/> <location filename="../assets/StreamTab.qml" line="186"/>
<source>Reload</source> <source>Reload</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>