Fix deleting app shortcuts

This commit is contained in:
MM20 2023-12-11 22:34:14 +01:00
parent bdf8b1f0d7
commit 79ab775ef0
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -159,6 +159,9 @@ internal data class LauncherShortcut(
return LauncherShortcutSerializer()
}
override val canDelete: Boolean
get() = launcherShortcut.isPinned
override suspend fun delete(context: Context) {
val launcherApps = context.getSystemService(Context.LAUNCHER_APPS_SERVICE) as LauncherApps
if (!launcherApps.hasShortcutHostPermission()) return