Hack for closing all folders on launching an app
Hack for closing all folders on launching an app
In a situation like that a folder has sub-folders and panels, and its sub-folders/panels which have shortcuts or so, if user taps an shorcut(in folder/panel) to launch , then all opened folders will be closed.
01 // Desktop’s onPaused event handler
02 if (LL.getEvent().getContainer().getView().hasWindowFocus()) {
02 if (LL.getEvent().getContainer().getView().getAlpha() == 1) {
03 LL.runAction(EventHandler.CLOSE_ALL_FOLDERS);
04 }
Line 02 is a hack.
When user enters into edit mode, and then add items by using “All apps”, desktop’s onPaused event is called. If line 02 doesnt exist, to-be-added apps wil be added to desktop, not to a folder/panel where user wanted to add.
]]>