on xenial help sign in
Fix some code that accidentally landed in trunk before it got cleaned up. The current code just has some duplication to it that should be unified.

Approved by: Michael Zanetti

commit7ae0699a75ef6811455546e7cd3b17845345be12 authorMichael Terry <michael.terry@canonical.com> dateTue 30 Sep 2014, 16:56 (12 years ago) parent95bd37dba0dba7
1 file changed+8−13
qml/Shell.qml+8−13
qml/Shell.qml+8−13
@@ -513,16 +513,19 @@ Item {
513513 }
514514
515515 function showDash() {
516− if (shell.locked) {
517− return;
516+ if (greeter.fakeActiveForApp !== "") { // just in case user gets here
517+ return
518518 }
519+
519520 if (greeter.shown) {
520521 greeter.hideRight();
521522 launcher.fadeOut();
522523 }
523524
524− ApplicationManager.requestFocusApplication("unity8-dash")
525− launcher.fadeOut();
525+ if (ApplicationManager.focusedApplicationId != "unity8-dash") {
526+ ApplicationManager.requestFocusApplication("unity8-dash")
527+ launcher.fadeOut();
528+ }
526529 }
527530
528531 Item {
@@ -564,15 +567,7 @@ Item {
564567 available: edgeDemo.launcherEnabled && (!shell.locked || AccountsService.enableLauncherWhileLocked) && greeter.fakeActiveForApp === ""
565568
566569 onShowDashHome: showHome()
567− onDash: {
568− if (ApplicationManager.focusedApplicationId != "unity8-dash") {
569− showDash()
570− }
571− if (greeter.shown) {
572− launcher.fadeOut()
573− greeter.hideRight()
574− }
575− }
570+ onDash: showDash()
576571 onDashSwipeChanged: {
577572 if (dashSwipe) {
578573 dash.setCurrentScope("clickscope", false, true)