mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-02-17 04:20:38 +01:00
Update DirectoryAdapter.kt
This commit is contained in:
parent
a83765705d
commit
8c0f047809
@ -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…
x
Reference in New Issue
Block a user