Merge lp:~qqworini/ubuntu-rssreader-app/order-by-time into lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk

Proposed by Joey Chan
Status: Merged
Approved by: Roman Shchekin
Approved revision: 59
Merged at revision: 60
Proposed branch: lp:~qqworini/ubuntu-rssreader-app/order-by-time
Merge into: lp:~ubuntu-shorts-dev/ubuntu-rssreader-app/trunk
Diff against target: 117 lines (+11/-10)
8 files modified
RssFeedPage.qml (+1/-1)
XmlNetwork.qml (+2/-1)
article_items/ArticleFullImg.qml (+1/-1)
article_items/ArticleOneImgA.qml (+1/-1)
article_items/ArticleTextA.qml (+1/-1)
article_items/ArticleTextB.qml (+1/-1)
databasemodule_v2.js (+3/-3)
listview/ListModePage.qml (+1/-1)
To merge this branch: bzr merge lp:~qqworini/ubuntu-rssreader-app/order-by-time
Reviewer Review Type Date Requested Status
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Ubuntu Shorts Developers Pending
Review via email: mp+184244@code.launchpad.net

Commit message

all grid items now sort by time value

warning: if the time value looks strange, pls refresh it (because of database updated)

Description of the change

all grid items now sort by time value

warning: if the time value looks strange, pls refresh it (because of database updated)

To post a comment you must log in.
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
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'RssFeedPage.qml'
2--- RssFeedPage.qml 2013-09-03 16:58:01 +0000
3+++ RssFeedPage.qml 2013-09-06 07:31:05 +0000
4@@ -98,7 +98,7 @@
5
6 Label {
7 id: label_time
8- text: DateUtils.formatRelativeTime(i18n, DateUtils.parseDate(pubdate))
9+ text: DateUtils.formatRelativeTime(i18n, pubdate)
10 fontSize: "small"
11 anchors.horizontalCenter: parent.horizontalCenter
12 width: parent.width - units.gu(4)
13
14=== modified file 'XmlNetwork.qml'
15--- XmlNetwork.qml 2013-09-04 15:34:28 +0000
16+++ XmlNetwork.qml 2013-09-06 07:31:05 +0000
17@@ -7,6 +7,7 @@
18
19 import "databasemodule_v2.js" as DB
20 import "./imgSeparator.js" as ImageUtils
21+import "./dateutils.js" as DateUtils
22
23 Item {
24 id: xmlNetworkItem
25@@ -84,7 +85,7 @@
26 "content": e.content,
27 "link": e.link,
28 "description": e.contentSnippet,
29- "pubDate": e.publishedDate,
30+ "pubDate": DateUtils.parseDate(e.publishedDate),
31 "guid": Qt.md5(e.content + e.publishedDate),
32 "image" : articleImage
33 }
34
35=== modified file 'article_items/ArticleFullImg.qml'
36--- article_items/ArticleFullImg.qml 2013-09-04 15:34:28 +0000
37+++ article_items/ArticleFullImg.qml 2013-09-06 07:31:05 +0000
38@@ -50,7 +50,7 @@
39 Label
40 {
41 id: label_time
42- text: DateUtils.formatRelativeTime(i18n, DateUtils.parseDate(rss_item.pubdate))
43+ text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
44 fontSize: "x-small"
45 width: parent.width
46 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
47
48=== modified file 'article_items/ArticleOneImgA.qml'
49--- article_items/ArticleOneImgA.qml 2013-09-04 15:34:28 +0000
50+++ article_items/ArticleOneImgA.qml 2013-09-06 07:31:05 +0000
51@@ -50,7 +50,7 @@
52 Label
53 {
54 id: label_time
55- text: DateUtils.formatRelativeTime(i18n, DateUtils.parseDate(rss_item.pubdate))
56+ text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
57 fontSize: "x-small"
58 width: parent.width
59 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
60
61=== modified file 'article_items/ArticleTextA.qml'
62--- article_items/ArticleTextA.qml 2013-09-04 15:34:28 +0000
63+++ article_items/ArticleTextA.qml 2013-09-06 07:31:05 +0000
64@@ -29,7 +29,7 @@
65 Label
66 {
67 id: label_time
68- text: DateUtils.formatRelativeTime(i18n, DateUtils.parseDate(rss_item.pubdate))
69+ text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
70 fontSize: "x-small"
71 width: parent.width
72 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
73
74=== modified file 'article_items/ArticleTextB.qml'
75--- article_items/ArticleTextB.qml 2013-09-04 15:34:28 +0000
76+++ article_items/ArticleTextB.qml 2013-09-06 07:31:05 +0000
77@@ -29,7 +29,7 @@
78 Label
79 {
80 id: label_time
81- text: DateUtils.formatRelativeTime(i18n, DateUtils.parseDate(rss_item.pubdate))
82+ text: DateUtils.formatRelativeTime(i18n, rss_item.pubdate)
83 fontSize: "x-small"
84 width: parent.width
85 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
86
87=== modified file 'databasemodule_v2.js'
88--- databasemodule_v2.js 2013-09-04 15:34:28 +0000
89+++ databasemodule_v2.js 2013-09-06 07:31:05 +0000
90@@ -211,11 +211,11 @@
91
92 db.transaction(function(tx) {
93 if (params == undefined || params.isAll) // miss params
94- dbResult = tx.executeSql('SELECT article.*, feed.title as feed_name FROM article inner join feed on article.feed_id = feed.id')
95+ dbResult = tx.executeSql('SELECT article.*, feed.title as feed_name FROM article inner join feed on article.feed_id = feed.id ORDER BY article.pubdate DESC')
96 else if (params.feedId)
97- dbResult = tx.executeSql('SELECT article.*, feed.title as feed_name FROM article inner join feed on article.feed_id = feed.id WHERE article.feed_id = ?', [params.feedId])
98+ dbResult = tx.executeSql('SELECT article.*, feed.title as feed_name FROM article inner join feed on article.feed_id = feed.id WHERE article.feed_id = ? ORDER BY article.pubdate DESC', [params.feedId])
99 else if (params.tagId)
100- dbResult = tx.executeSql('SELECT article.*, feed.title as feed_name FROM article inner join feed on article.feed_id = feed.id WHERE article.feed_id IN (SELECT feed_id FROM feed_tag WHERE tag_id = ?)', [params.tagId])
101+ dbResult = tx.executeSql('SELECT article.*, feed.title as feed_name FROM article inner join feed on article.feed_id = feed.id WHERE article.feed_id IN (SELECT feed_id FROM feed_tag WHERE tag_id = ?) ORDER BY article.pubdate DESC', [params.tagId])
102 }
103 )
104 return dbResult;
105
106=== modified file 'listview/ListModePage.qml'
107--- listview/ListModePage.qml 2013-09-03 16:58:01 +0000
108+++ listview/ListModePage.qml 2013-09-06 07:31:05 +0000
109@@ -122,7 +122,7 @@
110
111 ListItems.Subtitled {
112 text: model.title
113- subText: DateUtils.formatRelativeTime(i18n, DateUtils.parseDate(model.pubdate)) + ", " + model.feed_name
114+ subText: DateUtils.formatRelativeTime(i18n, model.pubdate) + ", " + model.feed_name
115 progression: false
116 icon: selectIcon()
117 iconFrame: true

Subscribers

People subscribed via source and target branches