Merge lp:~mrqtros/ubuntu-rssreader-app/uitk13-few-fixes into lp:ubuntu-rssreader-app

Proposed by Roman Shchekin
Status: Merged
Approved by: Joey Chan
Approved revision: 411
Merged at revision: 411
Proposed branch: lp:~mrqtros/ubuntu-rssreader-app/uitk13-few-fixes
Merge into: lp:ubuntu-rssreader-app
Prerequisite: lp:~qqworini/ubuntu-rssreader-app/uitk-1_3
Diff against target: 74 lines (+17/-23)
3 files modified
manifest.json.4pro (+1/-1)
shorts/qml/components/BottomEdgeTabs.qml (+1/-1)
shorts/qml/utils/imgSeparator.js (+15/-21)
To merge this branch: bzr merge lp:~mrqtros/ubuntu-rssreader-app/uitk13-few-fixes
Reviewer Review Type Date Requested Status
Joey Chan Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Needs Fixing
Jenkins Bot continuous-integration Approve
Review via email: mp+275625@code.launchpad.net

This proposal supersedes a proposal from 2015-10-24.

Commit message

* Manifest version fro PRO
* BottomEdgeTabs fixed
* Regex for image parsing

Description of the change

* Manifest version fro PRO
* BottomEdgeTabs fixed
* Regex for image parsing

To post a comment you must log in.
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Nicholas Skaggs (nskaggs) wrote :

Let me know if you have further troubles. I'll be fixing the messages jenkins leaves to be a bit saner.

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote : Posted in a previous version of this proposal
review: Needs Fixing (continuous-integration)
Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Joey Chan (qqworini) wrote :

Approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'manifest.json.4pro'
2--- manifest.json.4pro 2015-07-21 19:41:58 +0000
3+++ manifest.json.4pro 2015-10-24 13:58:25 +0000
4@@ -11,5 +11,5 @@
5 },
6 "version": "1.0.6",
7 "maintainer": "Roman Shchekin <mrqtros@gmail.com>",
8- "framework": "ubuntu-sdk-15.04"
9+ "framework": "ubuntu-sdk-15.04.1-qml"
10 }
11
12=== modified file 'shorts/qml/components/BottomEdgeTabs.qml'
13--- shorts/qml/components/BottomEdgeTabs.qml 2015-10-24 13:58:24 +0000
14+++ shorts/qml/components/BottomEdgeTabs.qml 2015-10-24 13:58:25 +0000
15@@ -164,7 +164,7 @@
16 z: 1
17 width: tipLabel.paintedWidth + units.gu(6)
18 height: bottomEdge.tipHeight + units.gu(1)
19- color: bottomEdgeTipColor //color: "#C9C9C9"
20+ backgroundColor: bottomEdgeTipColor //color: "#C9C9C9"
21
22 Label {
23 id: tipLabel
24
25=== modified file 'shorts/qml/utils/imgSeparator.js'
26--- shorts/qml/utils/imgSeparator.js 2015-07-04 08:38:18 +0000
27+++ shorts/qml/utils/imgSeparator.js 2015-10-24 13:58:25 +0000
28@@ -1,31 +1,25 @@
29-function separate(rss_content) {
30- var image_array = []
31-
32-
33- image_array = rss_content.split("<img")
34- // console.log("SPLIT");
35-
36- image_array.shift() ;
37-
38- for (var i=0; i<image_array.length; i++)
39- {
40- try {
41- image_array[i] = image_array[i].split('src=')[1].split(/"|"/)[1]
42- if (image_array[i].indexOf("//") === 0)
43- image_array[i] = "http:" + image_array[i]
44- }
45- catch(err) {
46- ; // do nothing
47- }
48+.pragma library
49+
50+function separate(content) {
51+ var result = []
52+ var rx = /<img.*?src="(.*?)"/g
53+
54+ var e = rx.exec(content)
55+ while (e) {
56+ // Some simple checks here.
57+ if (e[1].indexOf("http") === 0)
58+ result.push(e[1])
59+
60+ e = rx.exec(content)
61 }
62
63- return image_array
64+ return result
65 }
66
67 function getFirstImage(content) {
68 var imgArr = separate(content)
69
70- if (imgArr.length > 0)
71+ if (imgArr.length)
72 return imgArr[0]
73
74 return null

Subscribers

People subscribed via source and target branches