mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
Update DirectoryAdapter.kt
This commit is contained in:
parent
a83765705d
commit
8c0f047809
1 changed files with 4 additions and 3 deletions
|
@ -541,6 +541,10 @@ class DirectoryAdapter(
|
|||
}
|
||||
|
||||
private fun tryCreateShortcut() {
|
||||
if (!isOreoPlus()) {
|
||||
return
|
||||
}
|
||||
|
||||
activity.handleLockedFolderOpening(getFirstSelectedItemPath() ?: "") { success ->
|
||||
if (success) {
|
||||
createShortcut()
|
||||
|
@ -549,9 +553,6 @@ class DirectoryAdapter(
|
|||
}
|
||||
|
||||
private fun createShortcut() {
|
||||
if (!isOreoPlus()) {
|
||||
return
|
||||
}
|
||||
val manager = activity.getSystemService(ShortcutManager::class.java)
|
||||
if (manager.isRequestPinShortcutSupported) {
|
||||
val dir = getFirstSelectedItem() ?: return
|
||||
|
|
Loading…
Reference in a new issue