mirror of
				https://github.com/SimpleMobileTools/Simple-Launcher.git
				synced 2025-06-05 21:59:15 +02:00 
			
		
		
		
	make sure casual static shortcuts work too
This commit is contained in:
		| @@ -391,6 +391,10 @@ class MainActivity : SimpleActivity(), FlingListener { | ||||
|             if (clickedGridItem.type == ITEM_TYPE_ICON) { | ||||
|                 launchApp(clickedGridItem.packageName) | ||||
|             } else if (clickedGridItem.type == ITEM_TYPE_SHORTCUT) { | ||||
|                 if (clickedGridItem.intent.isNotEmpty()) { | ||||
|                     launchShortcutIntent(clickedGridItem) | ||||
|                 } else { | ||||
|                     // launch pinned shortcuts | ||||
|                     val id = clickedGridItem.shortcutId | ||||
|                     val packageName = clickedGridItem.packageName | ||||
|                     val userHandle = android.os.Process.myUserHandle() | ||||
| @@ -400,6 +404,7 @@ class MainActivity : SimpleActivity(), FlingListener { | ||||
|                 } | ||||
|             } | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     fun showHomeIconMenu(x: Float, y: Float, gridItem: HomeScreenGridItem, isOnAllAppsFragment: Boolean) { | ||||
|         home_screen_grid.hideResizeLines() | ||||
|   | ||||
| @@ -38,6 +38,7 @@ fun Activity.uninstallApp(packageName: String) { | ||||
|     } | ||||
| } | ||||
|  | ||||
| // launch static or dynamic shortcuts that have intents as string | ||||
| fun Activity.launchShortcutIntent(item: HomeScreenGridItem) { | ||||
|     try { | ||||
|         val intent = Intent.parseUri(item.intent, 0) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user