mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +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() {
|
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
|
||||||
|
|
Loading…
Reference in a new issue