Fix issue with trash not opening from taskbar

This commit is contained in:
Nariman Jelveh
2024-05-03 19:57:48 -07:00
parent 33a6f4c49f
commit ecd9d5493f
2 changed files with 20 additions and 5 deletions
+18 -3
View File
@@ -113,15 +113,15 @@ function UITaskbarItem(options){
// -------------------------------------------
if(menu_items.length > 0)
menu_items.push('-');
//------------------------------------------
// New Window
//------------------------------------------
if(options.app){
if(options.app && options.app !== 'trash'){
menu_items.push({
html: 'New Window',
val: $(this).attr('data-id'),
onClick: function(){
// is trash?
window.launch_app({
name: options.app,
maximized: (isMobile.phone || isMobile.tablet),
@@ -130,6 +130,22 @@ function UITaskbarItem(options){
})
}
//------------------------------------------
// Open Trash
//------------------------------------------
else if(options.app && options.app === 'trash'){
menu_items.push({
html: 'Open Trash',
val: $(this).attr('data-id'),
onClick: function(){
window.launch_app({
name: options.app,
path: window.trash_path,
maximized: (isMobile.phone || isMobile.tablet),
})
}
})
}
//------------------------------------------
// Empty Trash
//------------------------------------------
if(options.app === 'trash' && options.name === 'Trash'){
@@ -145,7 +161,6 @@ function UITaskbarItem(options){
}
})
}
//------------------------------------------
// Remove from Taskbar
//------------------------------------------