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

Proposed by Arthur Mello
Status: Merged
Approved by: Renato Araujo Oliveira Filho
Approved revision: 1310
Merged at revision: 1311
Proposed branch: lp:~artmello/gallery-app/gallery-app-fix_1569844
Merge into: lp:gallery-app
Prerequisite: lp:~artmello/gallery-app/gallery-app-qml_content_hub
Diff against target: 59 lines (+16/-4)
2 files modified
rc/qml/OrganicView/OrganicMediaList.qml (+3/-1)
rc/qml/PickerScreen.qml (+13/-3)
To merge this branch: bzr merge lp:~artmello/gallery-app/gallery-app-fix_1569844
Reviewer Review Type Date Requested Status
Renato Araujo Oliveira Filho (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Bill Filler (community) Needs Fixing
Review via email: mp+292506@code.launchpad.net

Commit message

Wait gallery ends collection processing before loading events model on picker mode

Description of the change

Wait gallery ends collection processing before loading events model on picker mode

Test steps
==========
1. Make sure that gallery has no media files for today events (delete the existing ones);
2. Make sure gallery is closed;
3. Take a photo with camera-app;
4. Open messaging-app, create a new message and try to attach a photo from gallery;
5. Make sure that the photo is visible on the events view.

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

Do not display event if there is no media on it

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Bill Filler (bfiller) wrote :

This doesn't work. I don't see all my photos anymorr in picking mode. Just todays.
I see spinners under photos like something is trying to load but they don't show up.

review: Needs Fixing
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

works as expected just a small inline comment.

1308. By Arthur Mello

Fix OrganicMediaList properties

1309. By Arthur Mello

Fix typo

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

looks good.

review: Approve
Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

Use real for the height property.

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) :
review: Needs Fixing
1310. By Arthur Mello

Change property type

Revision history for this message
Renato Araujo Oliveira Filho (renatofilho) wrote :

looks good now.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'rc/qml/OrganicView/OrganicMediaList.qml'
2--- rc/qml/OrganicView/OrganicMediaList.qml 2016-02-25 18:01:15 +0000
3+++ rc/qml/OrganicView/OrganicMediaList.qml 2016-04-26 21:30:39 +0000
4@@ -41,6 +41,8 @@
5 property var event
6 ///
7 property alias mediaModel: eventView.model
8+ readonly property real organicMediaListHeight: __bigSize + __smallSize + __photosTopMargin + __margin + __margin/2
9+ readonly property alias mediaModelCount: mediaModel.count
10 ///
11 property SelectionState selection
12
13@@ -83,7 +85,7 @@
14
15 property alias mediaTypeFilter: mediaModel.mediaTypeFilter
16
17- height: __bigSize + __smallSize + __photosTopMargin + __margin + __margin/2
18+ height: organicMediaListHeight
19
20 function positionViewAtSelected(index) {
21 eventView.positionViewAtIndex(index, ListView.Center);
22
23=== modified file 'rc/qml/PickerScreen.qml'
24--- rc/qml/PickerScreen.qml 2016-04-26 21:30:39 +0000
25+++ rc/qml/PickerScreen.qml 2016-04-26 21:30:39 +0000
26@@ -97,6 +97,16 @@
27 }
28
29 Loader {
30+ id: eventCollectionModelLoader
31+ sourceComponent: allLoaded ? eventCollectionModelComponent : ""
32+
33+ Component {
34+ id: eventCollectionModelComponent
35+ EventCollectionModel { }
36+ }
37+ }
38+
39+ Loader {
40 id: mediaLibraryLoader
41 sourceComponent: allLoaded ? mediaLibraryComponent : ""
42
43@@ -157,13 +167,13 @@
44 head.actions: pickActions
45
46 selection: allLoaded ? selectionLoader.item : ""
47- model: EventCollectionModel {
48- mediaTypeFilter: getMediaTypeFilter()
49- }
50+ model: allLoaded && eventCollectionModelLoader.status == Loader.Ready ? eventCollectionModelLoader.item : ""
51
52 delegate: OrganicMediaList {
53 id: organicList
54 width: eventSelectView.width
55+ height: visible ? organicMediaListHeight : 0
56+ visible: mediaModelCount > 0
57 event: model.event
58 selection: eventSelectView.selection
59 mediaTypeFilter: getMediaTypeFilter()

Subscribers

People subscribed via source and target branches