Commit 3406db0c authored by Yari Polla's avatar Yari Polla Committed by Devin Lin
Browse files

homescreens: only close search widget and action drawer without opening the menu

parent c660d4c9
......@@ -40,22 +40,25 @@ MobileShell.HomeScreen {
forceActiveFocus();
}
Plasmoid.onActivated: {
// Always close action drawer
if (MobileShell.TopPanelControls.actionDrawerVisible) {
MobileShell.TopPanelControls.closeActionDrawer();
}
// Always close the search widget as well
if (searchWidget.isOpen) {
searchWidget.close();
}
Plasmoid.onActivated: {
// there's a couple of steps:
// - minimize windows (only if we are in an app)
// - open app drawer
// - close app drawer and, if necessary, restore windows
if (!plasmoid.nativeInterface.showingDesktop && !MobileShell.HomeScreenControls.homeScreenVisible) {
if (!plasmoid.nativeInterface.showingDesktop && !MobileShell.HomeScreenControls.homeScreenVisible
|| MobileShell.TopPanelControls.actionDrawerVisible
|| searchWidget.isOpen
) {
// Always close action drawer
if (MobileShell.TopPanelControls.actionDrawerVisible) {
MobileShell.TopPanelControls.closeActionDrawer();
}
// Always close the search widget as well
if (searchWidget.isOpen) {
searchWidget.close();
}
plasmoid.nativeInterface.showingDesktop = true;
} else if (homescreen.homeScreenState.currentView === HomeScreenState.PageView) {
homescreen.homeScreenState.openAppDrawer();
......
......@@ -39,22 +39,25 @@ MobileShell.HomeScreen {
}
}
Plasmoid.onActivated: {
// Always close action drawer
if (MobileShell.TopPanelControls.actionDrawerVisible) {
MobileShell.TopPanelControls.closeActionDrawer();
}
// Always close the search widget as well
if (search.isOpen) {
search.close();
}
Plasmoid.onActivated: {
// there's a couple of steps:
// - minimize windows (only if we are in an app)
// - open app drawer
// - close app drawer and, if necessary, restore windows
if (!plasmoid.nativeInterface.showingDesktop && !MobileShell.HomeScreenControls.homeScreenVisible) {
if (!plasmoid.nativeInterface.showingDesktop && !MobileShell.HomeScreenControls.homeScreenVisible
|| MobileShell.TopPanelControls.actionDrawerVisible
|| search.isOpen
) {
// Always close action drawer
if (MobileShell.TopPanelControls.actionDrawerVisible) {
MobileShell.TopPanelControls.closeActionDrawer();
}
// Always close the search widget as well
if (search.isOpen) {
search.close();
}
plasmoid.nativeInterface.showingDesktop = true;
} else if (homescreen.page == 0) {
homescreen.page = 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment