Merge lp:~mrqtros/ubuntu-rssreader-app/ubuntu-rssreader-app-fix-1534540 into lp:ubuntu-rssreader-app

Proposed by Roman Shchekin
Status: Merged
Approved by: Nicholas Skaggs
Approved revision: 418
Merged at revision: 418
Proposed branch: lp:~mrqtros/ubuntu-rssreader-app/ubuntu-rssreader-app-fix-1534540
Merge into: lp:ubuntu-rssreader-app
Diff against target: 222 lines (+28/-71)
5 files modified
shorts/qml/components/ArticleViewItem.qml (+2/-2)
shorts/qml/components/FakeHeader.qml (+8/-8)
shorts/qml/components/NetworkManager.qml (+2/-2)
shorts/qml/pages/ArticleViewPage.qml (+2/-2)
shorts/qml/shorts-app.qml (+14/-57)
To merge this branch: bzr merge lp:~mrqtros/ubuntu-rssreader-app/ubuntu-rssreader-app-fix-1534540
Reviewer Review Type Date Requested Status
Jenkins Bot continuous-integration Approve
Ubuntu Shorts Developers Pending
Review via email: mp+282841@code.launchpad.net
To post a comment you must log in.
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: 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: Needs Fixing (continuous-integration)
Revision history for this message
Jenkins Bot (ubuntu-core-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 'shorts/qml/components/ArticleViewItem.qml'
2--- shorts/qml/components/ArticleViewItem.qml 2015-10-24 07:06:24 +0000
3+++ shorts/qml/components/ArticleViewItem.qml 2016-01-16 10:56:25 +0000
4@@ -18,7 +18,7 @@
5 Item {
6 id: articleViewRoot
7
8- signal articleStatusChanged(int tagId, int articleId, string status)
9+ signal articleStatusChanged(var article, string status)
10 signal articleFavouriteChanged(var article, string favourite)
11
12 property bool showEmptyPlaceholder: true
13@@ -108,7 +108,7 @@
14 if (modelItem.status != "1") {
15 var dbResult = DB.updateArticleStatus(modelItem.id, "1")
16 if (dbResult.rowsAffected == 1) {
17- articleStatusChanged(modelItem.tagId, modelItem.id, "1")
18+ articleStatusChanged(modelItem, "1")
19 }
20 }
21 }
22
23=== modified file 'shorts/qml/components/FakeHeader.qml'
24--- shorts/qml/components/FakeHeader.qml 2015-10-24 07:06:24 +0000
25+++ shorts/qml/components/FakeHeader.qml 2016-01-16 10:56:25 +0000
26@@ -22,17 +22,17 @@
27 Column {
28 id: fakeHeader
29
30- height: units.gu(9)
31+ height: units.gu(6)
32
33 Rectangle {
34- height: units.gu(7)
35+ height: units.gu(5)
36 width: parent.width
37 }
38
39- Rectangle {
40- color: "#F5F5F5" // old purple "#C9C9C9"
41- height: units.gu(2)
42- anchors.left: parent.left
43- anchors.right: parent.right
44- }
45+// Rectangle {
46+// color: "#F5F5F5" // old purple "#C9C9C9"
47+// height: units.gu(2)
48+// anchors.left: parent.left
49+// anchors.right: parent.right
50+// }
51 }
52
53=== modified file 'shorts/qml/components/NetworkManager.qml'
54--- shorts/qml/components/NetworkManager.qml 2016-01-04 18:43:45 +0000
55+++ shorts/qml/components/NetworkManager.qml 2016-01-16 10:56:25 +0000
56@@ -15,8 +15,8 @@
57 Item {
58 id: networkManagerRoot
59
60- signal downloadFinished(int tagId)
61- signal downloadStarted(int tagId)
62+ signal downloadFinished(int topicId)
63+ signal downloadStarted(int topicId)
64
65 property string operationStatus: "success"
66 property bool __useGFA: optionsKeeper.useGoogleSearch
67
68=== modified file 'shorts/qml/pages/ArticleViewPage.qml'
69--- shorts/qml/pages/ArticleViewPage.qml 2015-10-24 07:06:24 +0000
70+++ shorts/qml/pages/ArticleViewPage.qml 2016-01-16 10:56:25 +0000
71@@ -24,12 +24,12 @@
72
73 function setFeed(model, index) {
74 innerArticleView.setFeed(model, index)
75- title = innerArticleView.feedTitle
76 }
77
78+ title: innerArticleView.feedTitle
79+
80 ArticleViewItem {
81 id: innerArticleView
82-
83 anchors.fill: parent
84 }
85
86
87=== modified file 'shorts/qml/shorts-app.qml'
88--- shorts/qml/shorts-app.qml 2016-01-04 11:46:35 +0000
89+++ shorts/qml/shorts-app.qml 2016-01-16 10:56:25 +0000
90@@ -71,10 +71,7 @@
91 return
92 }
93
94- var feeds
95- if (topicId !== 0)
96- feeds = DB.loadFeedsFromTag(topicId)
97- else feeds = DB.loadFeeds()
98+ var feeds = topicId ? DB.loadFeedsFromTag(topicId) : DB.loadFeeds()
99
100 var feedarray = []
101 for (var i=0; i< feeds.rows.length; i++) {
102@@ -83,15 +80,15 @@
103 networkManager.updateFeeds(feedarray, topicId)
104 }
105
106- function reloadViews(tagId) {
107+ function reloadViews(topicId) {
108 // savedTab.reload() // Doesn't change with network update.
109- tagId = tagId || 0
110+ topicId = topicId || 0
111
112 shortsTab.reloadTab()
113- if (tagId == 0 || !repeater.containsTopic(tagId))
114+ if (topicId == 0 || !repeater.containsTopic(topicId))
115 repeater.reloadTabs()
116
117- tabstabs.selectTopic(tagId)
118+ tabstabs.selectTopic(topicId)
119 }
120
121 // refresh "Saved" Tab
122@@ -287,11 +284,14 @@
123
124 /* Used for keeping status in sync across tabs.
125 */
126- function updateStatusInModels(tagId, articleId, status) {
127+ function updateStatusInModels(article, status) {
128+ var topicId = article.tagId
129+ var articleId = article.id
130+
131 savedTab.updateStatusInModel(articleId, status)
132 shortsTab.updateStatusInModel(articleId, status)
133 for(var i = 0; i < repeater.count; i++) {
134- if (repeater.itemAt(i).topicId == tagId) {
135+ if (repeater.itemAt(i).topicId == topicId) {
136 repeater.itemAt(i).updateStatusInModel(articleId, status)
137 break
138 }
139@@ -301,13 +301,13 @@
140 /* Used for keeping favourite in sync across tabs.
141 */
142 function updateFavouriteInModels(article, fav) {
143- var tagId = article.tagId
144+ var topicId = article.tagId
145 var articleId = article.id
146
147 savedTab.updateFavouriteInModel(article, fav)
148 shortsTab.updateFavouriteInModel(articleId, fav)
149 for(var i = 0; i < repeater.count; i++) {
150- if (repeater.itemAt(i).topicId == tagId) {
151+ if (repeater.itemAt(i).topicId == topicId) {
152 repeater.itemAt(i).updateFavouriteInModel(articleId, fav)
153 return
154 }
155@@ -416,7 +416,7 @@
156 target: articlePage.articleView
157
158 onArticleStatusChanged: {
159- tabstabs.updateStatusInModels(tagId, articleId, status)
160+ tabstabs.updateStatusInModels(article, status)
161 }
162
163 onArticleFavouriteChanged: {
164@@ -444,7 +444,7 @@
165 id: networkManager
166
167 onDownloadFinished: {
168- reloadViews(tagId)
169+ reloadViews(topicId)
170 }
171
172 onDownloadStarted: {
173@@ -503,49 +503,6 @@
174 } // Component
175
176 Component {
177- id: addReadsPopoverComp
178-
179- ActionSelectionPopover {
180- id: addReadsPopover
181- objectName: "addreadspopover"
182-
183- actions: ActionList {
184- id: popoverActionsList
185-
186- Action {
187- text: i18n.tr("+ Add feeds")
188- onTriggered: {
189- /* When we want to show "Append feed" page from
190- * any page except of "Choose topic",
191- * we should clear it (mark as dirty).
192- * ATTENTION: similar call can be found in hotkeys section.
193- */
194- pageStack.push(appendFeedPage, {"isDirty" : true})
195- }
196- }
197-
198- Action {
199- text: i18n.tr("Add online accounts")
200- onTriggered: {
201- PopupUtils.open(errorDialogComponent, null,
202- {"text" : i18n.tr("Online accounts are not available for now"),
203- "title" : i18n.tr("We are sorry")})
204- }
205- }
206-
207- Action {
208- text: i18n.tr("Import subscriptions")
209- onTriggered: {
210- PopupUtils.open(errorDialogComponent, null,
211- {"text" : i18n.tr("Importing subscriptions is not available for now"),
212- "title" : i18n.tr("We are sorry")})
213- }
214- }
215- } // ActionList
216- } // ActionSelectionPopover
217- } // Component
218-
219- Component {
220 id: errorDialogComponent
221
222 Dialog {

Subscribers

People subscribed via source and target branches