Merge lp:~ahayzen/music-app/remix-content-hub-fix-1381522 into lp:music-app/remix

Proposed by Andrew Hayzen
Status: Merged
Approved by: Victor Thompson
Approved revision: 673
Merged at revision: 672
Proposed branch: lp:~ahayzen/music-app/remix-content-hub-fix-1381522
Merge into: lp:music-app/remix
Diff against target: 66 lines (+19/-3)
2 files modified
music-app.qml (+17/-3)
tests/autopilot/music_app/__init__.py (+2/-0)
To merge this branch: bzr merge lp:~ahayzen/music-app/remix-content-hub-fix-1381522
Reviewer Review Type Date Requested Status
Victor Thompson Approve
Ubuntu Phone Apps Jenkins Bot continuous-integration Approve
Review via email: mp+238632@code.launchpad.net

Commit message

* Allow for imports to start when already importing

Description of the change

* Allow for imports to start when already importing

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)
673. By Andrew Hayzen

* Tweak to autopilot to wait for page to disappear before searching for the new now playing page

Revision history for this message
Ubuntu Phone Apps Jenkins Bot (ubuntu-phone-apps-jenkins-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

LGTM! Pretty solid fix!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'music-app.qml'
2--- music-app.qml 2014-10-11 16:47:57 +0000
3+++ music-app.qml 2014-10-16 22:46:28 +0000
4@@ -268,6 +268,7 @@
5 // Content hub support
6 property list<ContentItem> importItems
7 property var activeTransfer
8+ property int importId: 0
9
10 ContentTransferHint {
11 anchors {
12@@ -284,6 +285,10 @@
13 if (activeTransfer.state === ContentTransfer.Charged) {
14 importItems = activeTransfer.items;
15
16+ var processId = importId++;
17+
18+ console.debug("Triggering content-hub import ID", processId);
19+
20 searchPaths = [];
21
22 var err = [];
23@@ -308,9 +313,16 @@
24
25
26 if (success === true) {
27- contentHubWaitForFile.dialog = PopupUtils.open(contentHubWait, mainView)
28- contentHubWaitForFile.searchPaths = contentHub.searchPaths;
29- contentHubWaitForFile.start();
30+ if (contentHubWaitForFile.processId === -1) {
31+ contentHubWaitForFile.dialog = PopupUtils.open(contentHubWait, mainView)
32+ contentHubWaitForFile.searchPaths = contentHub.searchPaths;
33+ contentHubWaitForFile.processId = processId;
34+ contentHubWaitForFile.start();
35+ } else {
36+ contentHubWaitForFile.searchPaths.push.apply(contentHubWaitForFile.searchPaths, contentHub.searchPaths);
37+ contentHubWaitForFile.count = 0;
38+ contentHubWaitForFile.restart();
39+ }
40 }
41 else {
42 var errordialog = PopupUtils.open(contentHubError, mainView)
43@@ -379,8 +391,10 @@
44 property var dialog: null
45 property var searchPaths
46 property int count: 0
47+ property int processId: -1
48
49 function stopTimer() {
50+ processId = -1;
51 count = 0;
52 stop();
53
54
55=== modified file 'tests/autopilot/music_app/__init__.py'
56--- tests/autopilot/music_app/__init__.py 2014-10-13 16:56:55 +0000
57+++ tests/autopilot/music_app/__init__.py 2014-10-16 22:46:28 +0000
58@@ -116,6 +116,8 @@
59 track = tracksPage.get_track(0)
60 self.app.pointing_device.click_object(track)
61
62+ tracksPage.visible.wait_for(False) # wait until page has hidden
63+
64 # TODO: when using bottom edge wait for .isReady on tracksPage
65
66 # wait for now playing page to be visible

Subscribers

People subscribed via source and target branches