Merge lp:~artmello/gallery-app/gallery-app-open_new_photo_from_scope into lp:gallery-app

Proposed by Arthur Mello
Status: Needs review
Proposed branch: lp:~artmello/gallery-app/gallery-app-open_new_photo_from_scope
Merge into: lp:gallery-app
Diff against target: 44 lines (+13/-0)
1 file modified
rc/qml/MainScreen.qml (+13/-0)
To merge this branch: bzr merge lp:~artmello/gallery-app/gallery-app-open_new_photo_from_scope
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing
PS Jenkins bot continuous-integration Needs Fixing
Ubuntu Phablet Team Pending
Review via email: mp+249705@code.launchpad.net

Commit message

If the photo requested to be opened is not on the collection yet, make sure to check again when the collection is updated. That is a problem since now the load process is async

Description of the change

If the photo requested to be opened is not on the collection yet, make sure to check again when the collection is updated. That is a problem since now the load process is async

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

1150. By Arthur Mello

If the photo requested to be opened is not on the collection yet, make sure to check again when the collection is
updated. That is a problem since now the load process is async

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'rc/qml/MainScreen.qml'
2--- rc/qml/MainScreen.qml 2015-02-09 18:26:03 +0000
3+++ rc/qml/MainScreen.qml 2015-02-13 19:14:15 +0000
4@@ -38,6 +38,8 @@
5 property string mediaCurrentlyInView
6 StateSaver.properties: "mediaCurrentlyInView"
7
8+ property string mediaRequestedButNotFound
9+
10 property bool applicationLoaded: application.allLoaded
11
12 //fullScreen property is used on autopilot tests
13@@ -51,6 +53,7 @@
14 photoViewerLoader.item.fadeClosed();
15 }
16
17+ mediaRequestedButNotFound = "";
18 mediaCurrentlyInView = media;
19 for (var i = 0; i < MANAGER.mediaLibrary.count; i++) {
20 if (MANAGER.mediaLibrary.getAt(i).path == mediaCurrentlyInView) {
21@@ -71,6 +74,8 @@
22 return;
23 }
24 }
25+
26+ mediaRequestedButNotFound = media;
27 }
28
29 function setHeaderVisibility(visible)
30@@ -116,6 +121,14 @@
31 }
32 }
33
34+ Connections {
35+ target: MANAGER
36+ onCollectionChanged: {
37+ if (mediaRequestedButNotFound !== "")
38+ openMediaFile(mediaRequestedButNotFound);
39+ }
40+ }
41+
42 function pushPage(page) {
43 pageStack.push(page);
44 }

Subscribers

People subscribed via source and target branches