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
=== modified file 'shorts/qml/components/ArticleViewItem.qml'
--- shorts/qml/components/ArticleViewItem.qml 2015-10-24 07:06:24 +0000
+++ shorts/qml/components/ArticleViewItem.qml 2016-01-16 10:56:25 +0000
@@ -18,7 +18,7 @@
18Item {18Item {
19 id: articleViewRoot19 id: articleViewRoot
2020
21 signal articleStatusChanged(int tagId, int articleId, string status)21 signal articleStatusChanged(var article, string status)
22 signal articleFavouriteChanged(var article, string favourite)22 signal articleFavouriteChanged(var article, string favourite)
2323
24 property bool showEmptyPlaceholder: true24 property bool showEmptyPlaceholder: true
@@ -108,7 +108,7 @@
108 if (modelItem.status != "1") {108 if (modelItem.status != "1") {
109 var dbResult = DB.updateArticleStatus(modelItem.id, "1")109 var dbResult = DB.updateArticleStatus(modelItem.id, "1")
110 if (dbResult.rowsAffected == 1) {110 if (dbResult.rowsAffected == 1) {
111 articleStatusChanged(modelItem.tagId, modelItem.id, "1")111 articleStatusChanged(modelItem, "1")
112 }112 }
113 }113 }
114 }114 }
115115
=== modified file 'shorts/qml/components/FakeHeader.qml'
--- shorts/qml/components/FakeHeader.qml 2015-10-24 07:06:24 +0000
+++ shorts/qml/components/FakeHeader.qml 2016-01-16 10:56:25 +0000
@@ -22,17 +22,17 @@
22Column {22Column {
23 id: fakeHeader23 id: fakeHeader
2424
25 height: units.gu(9)25 height: units.gu(6)
2626
27 Rectangle {27 Rectangle {
28 height: units.gu(7)28 height: units.gu(5)
29 width: parent.width29 width: parent.width
30 }30 }
31 31
32 Rectangle {32// Rectangle {
33 color: "#F5F5F5" // old purple "#C9C9C9"33// color: "#F5F5F5" // old purple "#C9C9C9"
34 height: units.gu(2)34// height: units.gu(2)
35 anchors.left: parent.left35// anchors.left: parent.left
36 anchors.right: parent.right36// anchors.right: parent.right
37 }37// }
38}38}
3939
=== modified file 'shorts/qml/components/NetworkManager.qml'
--- shorts/qml/components/NetworkManager.qml 2016-01-04 18:43:45 +0000
+++ shorts/qml/components/NetworkManager.qml 2016-01-16 10:56:25 +0000
@@ -15,8 +15,8 @@
15Item {15Item {
16 id: networkManagerRoot16 id: networkManagerRoot
1717
18 signal downloadFinished(int tagId)18 signal downloadFinished(int topicId)
19 signal downloadStarted(int tagId)19 signal downloadStarted(int topicId)
2020
21 property string operationStatus: "success"21 property string operationStatus: "success"
22 property bool __useGFA: optionsKeeper.useGoogleSearch22 property bool __useGFA: optionsKeeper.useGoogleSearch
2323
=== modified file 'shorts/qml/pages/ArticleViewPage.qml'
--- shorts/qml/pages/ArticleViewPage.qml 2015-10-24 07:06:24 +0000
+++ shorts/qml/pages/ArticleViewPage.qml 2016-01-16 10:56:25 +0000
@@ -24,12 +24,12 @@
2424
25 function setFeed(model, index) {25 function setFeed(model, index) {
26 innerArticleView.setFeed(model, index)26 innerArticleView.setFeed(model, index)
27 title = innerArticleView.feedTitle
28 }27 }
2928
29 title: innerArticleView.feedTitle
30
30 ArticleViewItem {31 ArticleViewItem {
31 id: innerArticleView32 id: innerArticleView
32
33 anchors.fill: parent33 anchors.fill: parent
34 }34 }
3535
3636
=== modified file 'shorts/qml/shorts-app.qml'
--- shorts/qml/shorts-app.qml 2016-01-04 11:46:35 +0000
+++ shorts/qml/shorts-app.qml 2016-01-16 10:56:25 +0000
@@ -71,10 +71,7 @@
71 return71 return
72 }72 }
7373
74 var feeds74 var feeds = topicId ? DB.loadFeedsFromTag(topicId) : DB.loadFeeds()
75 if (topicId !== 0)
76 feeds = DB.loadFeedsFromTag(topicId)
77 else feeds = DB.loadFeeds()
7875
79 var feedarray = []76 var feedarray = []
80 for (var i=0; i< feeds.rows.length; i++) {77 for (var i=0; i< feeds.rows.length; i++) {
@@ -83,15 +80,15 @@
83 networkManager.updateFeeds(feedarray, topicId)80 networkManager.updateFeeds(feedarray, topicId)
84 }81 }
8582
86 function reloadViews(tagId) {83 function reloadViews(topicId) {
87 // savedTab.reload() // Doesn't change with network update.84 // savedTab.reload() // Doesn't change with network update.
88 tagId = tagId || 085 topicId = topicId || 0
8986
90 shortsTab.reloadTab()87 shortsTab.reloadTab()
91 if (tagId == 0 || !repeater.containsTopic(tagId))88 if (topicId == 0 || !repeater.containsTopic(topicId))
92 repeater.reloadTabs()89 repeater.reloadTabs()
9390
94 tabstabs.selectTopic(tagId)91 tabstabs.selectTopic(topicId)
95 }92 }
9693
97 // refresh "Saved" Tab94 // refresh "Saved" Tab
@@ -287,11 +284,14 @@
287284
288 /* Used for keeping status in sync across tabs.285 /* Used for keeping status in sync across tabs.
289 */286 */
290 function updateStatusInModels(tagId, articleId, status) {287 function updateStatusInModels(article, status) {
288 var topicId = article.tagId
289 var articleId = article.id
290
291 savedTab.updateStatusInModel(articleId, status)291 savedTab.updateStatusInModel(articleId, status)
292 shortsTab.updateStatusInModel(articleId, status)292 shortsTab.updateStatusInModel(articleId, status)
293 for(var i = 0; i < repeater.count; i++) {293 for(var i = 0; i < repeater.count; i++) {
294 if (repeater.itemAt(i).topicId == tagId) {294 if (repeater.itemAt(i).topicId == topicId) {
295 repeater.itemAt(i).updateStatusInModel(articleId, status)295 repeater.itemAt(i).updateStatusInModel(articleId, status)
296 break296 break
297 }297 }
@@ -301,13 +301,13 @@
301 /* Used for keeping favourite in sync across tabs.301 /* Used for keeping favourite in sync across tabs.
302 */302 */
303 function updateFavouriteInModels(article, fav) {303 function updateFavouriteInModels(article, fav) {
304 var tagId = article.tagId304 var topicId = article.tagId
305 var articleId = article.id305 var articleId = article.id
306306
307 savedTab.updateFavouriteInModel(article, fav)307 savedTab.updateFavouriteInModel(article, fav)
308 shortsTab.updateFavouriteInModel(articleId, fav)308 shortsTab.updateFavouriteInModel(articleId, fav)
309 for(var i = 0; i < repeater.count; i++) {309 for(var i = 0; i < repeater.count; i++) {
310 if (repeater.itemAt(i).topicId == tagId) {310 if (repeater.itemAt(i).topicId == topicId) {
311 repeater.itemAt(i).updateFavouriteInModel(articleId, fav)311 repeater.itemAt(i).updateFavouriteInModel(articleId, fav)
312 return312 return
313 }313 }
@@ -416,7 +416,7 @@
416 target: articlePage.articleView416 target: articlePage.articleView
417417
418 onArticleStatusChanged: {418 onArticleStatusChanged: {
419 tabstabs.updateStatusInModels(tagId, articleId, status)419 tabstabs.updateStatusInModels(article, status)
420 }420 }
421421
422 onArticleFavouriteChanged: {422 onArticleFavouriteChanged: {
@@ -444,7 +444,7 @@
444 id: networkManager444 id: networkManager
445445
446 onDownloadFinished: {446 onDownloadFinished: {
447 reloadViews(tagId)447 reloadViews(topicId)
448 }448 }
449449
450 onDownloadStarted: {450 onDownloadStarted: {
@@ -503,49 +503,6 @@
503 } // Component503 } // Component
504504
505 Component {505 Component {
506 id: addReadsPopoverComp
507
508 ActionSelectionPopover {
509 id: addReadsPopover
510 objectName: "addreadspopover"
511
512 actions: ActionList {
513 id: popoverActionsList
514
515 Action {
516 text: i18n.tr("+ Add feeds")
517 onTriggered: {
518 /* When we want to show "Append feed" page from
519 * any page except of "Choose topic",
520 * we should clear it (mark as dirty).
521 * ATTENTION: similar call can be found in hotkeys section.
522 */
523 pageStack.push(appendFeedPage, {"isDirty" : true})
524 }
525 }
526
527 Action {
528 text: i18n.tr("Add online accounts")
529 onTriggered: {
530 PopupUtils.open(errorDialogComponent, null,
531 {"text" : i18n.tr("Online accounts are not available for now"),
532 "title" : i18n.tr("We are sorry")})
533 }
534 }
535
536 Action {
537 text: i18n.tr("Import subscriptions")
538 onTriggered: {
539 PopupUtils.open(errorDialogComponent, null,
540 {"text" : i18n.tr("Importing subscriptions is not available for now"),
541 "title" : i18n.tr("We are sorry")})
542 }
543 }
544 } // ActionList
545 } // ActionSelectionPopover
546 } // Component
547
548 Component {
549 id: errorDialogComponent506 id: errorDialogComponent
550507
551 Dialog {508 Dialog {

Subscribers

People subscribed via source and target branches