on xenial help sign in
Simplify showDash logic
1bbf057Michael Terry
qml/Shell.qml+5−14
@@ -513,16 +513,15 @@ Item {
513 }
513 }
514
514
515 function showDash() {
515 function showDash() {
516− if (shell.locked) {
517− return;
518− }
519 if (greeter.shown) {
516 if (greeter.shown) {
520 greeter.hideRight();
517 greeter.hideRight();
521 launcher.fadeOut();
518 launcher.fadeOut();
522 }
519 }
523
520
521+ if (ApplicationManager.focusedApplicationId != "unity8-dash") {
524− ApplicationManager.requestFocusApplication("unity8-dash")
522+ ApplicationManager.requestFocusApplication("unity8-dash")
525− launcher.fadeOut();
523+ launcher.fadeOut();
524+ }
526 }
525 }
527
526
528 Item {
527 Item {
@@ -564,15 +563,7 @@ Item {
564 available: edgeDemo.launcherEnabled && (!shell.locked || AccountsService.enableLauncherWhileLocked) && greeter.fakeActiveForApp === ""
563 available: edgeDemo.launcherEnabled && (!shell.locked || AccountsService.enableLauncherWhileLocked) && greeter.fakeActiveForApp === ""
565
564
566 onShowDashHome: showHome()
565 onShowDashHome: showHome()
567− onDash: {
568− if (ApplicationManager.focusedApplicationId != "unity8-dash") {
569− showDash()
566+ onDash: showDash()
570− }
571− if (greeter.shown) {
572− launcher.fadeOut()
573− greeter.hideRight()
574− }
575− }
576 onDashSwipeChanged: {
567 onDashSwipeChanged: {
577 if (dashSwipe) {
568 if (dashSwipe) {
578 dash.setCurrentScope("clickscope", false, true)
569 dash.setCurrentScope("clickscope", false, true)