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

Proposed by Andrew Hayzen
Status: Merged
Approved by: Victor Thompson
Approved revision: 646
Merged at revision: 646
Proposed branch: lp:~ahayzen/music-app/content-hub-fix-1381522
Merge into: lp:music-app/trusty
Diff against target: 52 lines (+17/-3)
1 file modified
music-app.qml (+17/-3)
To merge this branch: bzr merge lp:~ahayzen/music-app/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+238633@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

Note this is the 'backport' for the remix [0] mp.

0 - https://code.launchpad.net/~andrew-hayzen/music-app/remix-content-hub-fix-1381522/+merge/238632

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: Approve (continuous-integration)
Revision history for this message
Victor Thompson (vthompson) wrote :

LGTM!

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-09-23 15:59:28 +0000
3+++ music-app.qml 2014-10-16 22:27:29 +0000
4@@ -275,6 +275,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@@ -291,6 +292,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@@ -315,9 +320,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@@ -386,8 +398,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

Subscribers

People subscribed via source and target branches

to status/vote changes: