on xenial help sign in
Make scope dispatching work if fav scope is shown
8da608cAlbert Astals Cid
qml/Dash/Dash.qml+26−13
@@ -28,29 +28,42 @@ Showable {
28
28
29 visible: shown
29 visible: shown
30
30
31+ Connections {
32+ target: UriHandler
33+ onOpened: {
34+ backToDashContent()
35+ dashContent.scope.performQuery(uris[0])
36+ }
37+ }
38+
31 DashCommunicatorService {
39 DashCommunicatorService {
32 objectName: "dashCommunicatorService"
40 objectName: "dashCommunicatorService"
33 onSetCurrentScopeRequested: {
41 onSetCurrentScopeRequested: {
34 if (!isSwipe || !window.active || bottomEdgeController.progress != 0 || scopeItem.scope || dashContent.subPageShown) {
42 if (!isSwipe || !window.active || bottomEdgeController.progress != 0 || scopeItem.scope || dashContent.subPageShown) {
35 if (bottomEdgeController.progress != 0 && window.active) animate = false;
43 if (bottomEdgeController.progress != 0 && window.active) animate = false;
36 dashContent.setCurrentScopeAtIndex(index, animate, isSwipe)
44 dashContent.setCurrentScopeAtIndex(index, animate, isSwipe)
37− // Close dash overview and nested temp scopes in it
45+ backToDashContent()
38− if (bottomEdgeController.progress != 0) {
39− bottomEdgeController.enableAnimation = window.active;
40− bottomEdgeController.progress = 0;
41− }
42− // Close normal temp scopes (e.g. App Store)
43− if (scopeItem.scope) {
44− scopeItem.backClicked();
45− }
46− // Close previews
47− if (dashContent.subPageShown) {
48− dashContent.closePreview();
49− }
50 }
46 }
51 }
47 }
52 }
48 }
53
49
50+ function backToDashContent()
51+ {
52+ // Close dash overview and nested temp scopes in it
53+ if (bottomEdgeController.progress != 0) {
54+ bottomEdgeController.enableAnimation = window.active;
55+ bottomEdgeController.progress = 0;
56+ }
57+ // Close normal temp scopes (e.g. App Store)
58+ if (scopeItem.scope) {
59+ scopeItem.backClicked();
60+ }
61+ // Close previews
62+ if (dashContent.subPageShown) {
63+ dashContent.closePreview();
64+ }
65+ }
66+
54 function setCurrentScope(scopeId, animate, reset) {
67 function setCurrentScope(scopeId, animate, reset) {
55 var scopeIndex = -1;
68 var scopeIndex = -1;
56 for (var i = 0; i < scopes.count; ++i) {
69 for (var i = 0; i < scopes.count; ++i) {
qml/Dash/DashContent.qml−5
@@ -63,11 +63,6 @@ Item {
63 }
63 }
64 }
64 }
65
65
66− Connections {
67− target: UriHandler
68− onOpened: dashContentList.currentItem.theScope.performQuery(uris[0])
69− }
70−
71 function setCurrentScopeAtIndex(index, animate, reset) {
66 function setCurrentScopeAtIndex(index, animate, reset) {
72 // if the scopes haven't loaded yet, then wait until they are.
67 // if the scopes haven't loaded yet, then wait until they are.
73 if (!scopes.loaded) {
68 if (!scopes.loaded) {