mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
Update DirectoryAdapter.kt
This commit is contained in:
@ -541,6 +541,10 @@ class DirectoryAdapter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun tryCreateShortcut() {
|
private fun tryCreateShortcut() {
|
||||||
|
if (!isOreoPlus()) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
activity.handleLockedFolderOpening(getFirstSelectedItemPath() ?: "") { success ->
|
activity.handleLockedFolderOpening(getFirstSelectedItemPath() ?: "") { success ->
|
||||||
if (success) {
|
if (success) {
|
||||||
createShortcut()
|
createShortcut()
|
||||||
@ -549,9 +553,6 @@ class DirectoryAdapter(
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun createShortcut() {
|
private fun createShortcut() {
|
||||||
if (!isOreoPlus()) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
val manager = activity.getSystemService(ShortcutManager::class.java)
|
val manager = activity.getSystemService(ShortcutManager::class.java)
|
||||||
if (manager.isRequestPinShortcutSupported) {
|
if (manager.isRequestPinShortcutSupported) {
|
||||||
val dir = getFirstSelectedItem() ?: return
|
val dir = getFirstSelectedItem() ?: return
|
||||||
|
Reference in New Issue
Block a user