homescreens/folio: fix Meta key support

This commit is contained in:
Yari Polla 2022-09-23 20:36:34 +02:00
parent e11f31f48d
commit da347cb2dc

View file

@ -40,20 +40,23 @@ MobileShell.HomeScreen {
forceActiveFocus(); forceActiveFocus();
} }
Plasmoid.onActivated: { Plasmoid.onActivated: {
console.log("Triggered!", plasmoid.nativeInterface.showingDesktop) // Always close action drawer
if (MobileShell.TopPanelControls.actionDrawerVisible) {
MobileShell.TopPanelControls.closeActionDrawer();
}
// there's a couple of steps: // there's a couple of steps:
// - minimize windows // - minimize windows (only if we are in an app)
// - open app drawer // - open app drawer
// - restore windows // - close app drawer and, if necessary, restore windows
if (!plasmoid.nativeInterface.showingDesktop) { if (!plasmoid.nativeInterface.showingDesktop && !MobileShell.HomeScreenControls.homeScreenVisible) {
plasmoid.nativeInterface.showingDesktop = true; plasmoid.nativeInterface.showingDesktop = true;
} else if (homescreen.homeScreenState.currentView === MobileShell.HomeScreenState.PageView) { } else if (homescreen.homeScreenState.currentView === HomeScreenState.PageView) {
homescreen.homeScreenState.openAppDrawer() homescreen.homeScreenState.openAppDrawer();
} else { } else {
plasmoid.nativeInterface.showingDesktop = false plasmoid.nativeInterface.showingDesktop = false;
homescreen.homeScreenState.closeAppDrawer() homescreen.homeScreenState.closeAppDrawer();
} }
} }