2
0
Fork 1
mirror of https://github.com/FossifyOrg/Gallery.git synced 2025-04-07 20:19:40 +02:00

Merge pull request from FossifyOrg/fix_search_dialog

Fix issue with physical keyboards in copy/move dialog
This commit is contained in:
Naveen Singh 2025-04-02 20:25:33 +05:30 committed by GitHub
commit 5d108af0e7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,7 +1,8 @@
package org.fossify.gallery.dialogs
import android.graphics.Color
import android.view.KeyEvent
import android.view.KeyEvent.ACTION_UP
import android.view.KeyEvent.KEYCODE_BACK
import android.view.inputmethod.EditorInfo
import android.widget.Toast
import androidx.appcompat.app.AlertDialog
@ -54,10 +55,12 @@ class PickDirectoryDialog(
.setPositiveButton(org.fossify.commons.R.string.ok, null)
.setNegativeButton(org.fossify.commons.R.string.cancel, null)
.setOnKeyListener { dialogInterface, i, keyEvent ->
if (keyEvent.action == KeyEvent.ACTION_UP && i == KeyEvent.KEYCODE_BACK) {
return@setOnKeyListener if (keyEvent.action == ACTION_UP && i == KEYCODE_BACK) {
backPressed()
true
} else {
false
}
true
}
if (showOtherFolderButton) {