@@ -38,7 +38,7 @@ DashPreview {
3838 right: parent.right
3939 margins: units.gu(1)
4040 }
41− model: previewData.infoMap["more-screenshots"].value
41+ model: previewData.infoMap["more-screenshots"] != null ? previewData.infoMap["more-screenshots"].value : [previewData.image]
4242
4343 delegate: UbuntuShape {
4444 id: shape
@@ -138,9 +138,9 @@ DashPreview {
138138
139139 appName: root.previewData.title
140140 icon: IconUtil.from_gicon(root.previewData.appIcon)
141− rating: root.previewData.infoMap["rating"] ? root.previewData.infoMap["rating"].value : 0
141+ rating: Math.round(root.previewData.rating * 10)
142+ reviews: root.previewData.numRatings
142143 rated: root.previewData.infoMap["rated"] ? root.previewData.infoMap["rated"].value : 0
143− reviews: root.previewData.infoMap["reviews"] ? root.previewData.infoMap["reviews"].value : 0
144144 }
145145
146146 Label {
@@ -154,42 +154,47 @@ DashPreview {
154154 styleColor: "black"
155155 }
156156
157− ListItem.ThinDivider {}
158−
159− Item {
157+ Column {
158+ visible: root.previewData.rating >= 0
160159 anchors { left: parent.left; right: parent.right }
161− height: rateLabel.height
162−
163− Label {
164− id: rateLabel
165− fontSize: "medium"
166− color: "white"
167− style: Text.Raised
168− styleColor: "black"
169− opacity: .9
170− text: i18n.tr("Rate this")
171−
172− anchors.left: parent.left
173− anchors.verticalCenter: parent.verticalCenter
174− }
160+ spacing: parent.spacing
161+
162+ ListItem.ThinDivider { }
163+
164+ Item {
165+ anchors { left: parent.left; right: parent.right }
166+ height: rateLabel.height
167+
168+ Label {
169+ id: rateLabel
170+ fontSize: "medium"
171+ color: "white"
172+ style: Text.Raised
173+ styleColor: "black"
174+ opacity: .9
175+ text: i18n.tr("Rate this")
176+
177+ anchors.left: parent.left
178+ anchors.verticalCenter: parent.verticalCenter
179+ }
175180
176− // FIXME these need to be made interactive and connected to the scope
177− RatingStars {
178− anchors.right: parent.right
179− anchors.verticalCenter: parent.verticalCenter
181+ // FIXME these need to be made interactive and connected to the scope
182+ RatingStars {
183+ anchors.right: parent.right
184+ anchors.verticalCenter: parent.verticalCenter
185+ }
180186 }
181− }
182187
183− ListItem.ThinDivider {}
188+ ListItem.ThinDivider { }
184189
185− AppReviews {
186− objectName: "appReviews"
187− anchors { left: parent.left; right: parent.right }
190+ AppReviews {
191+ objectName: "appReviews"
192+ anchors { left: parent.left; right: parent.right }
188193
189− model: root.previewData.infoMap["comments"] ? root.previewData.infoMap["comments"].value : undefined
194+ model: root.previewData.infoMap["comments"] ? root.previewData.infoMap["comments"].value : undefined
190195
191− onSendReview: root.sendUserReview(review);
196+ onSendReview: root.sendUserReview(review);
197+ }
192198 }
193−
194199 }
195200}