mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-30 00:17:58 +01:00
show a toast when deleting the empty new folder
This commit is contained in:
parent
0b5005e0d0
commit
bfc1d3d0fd
1 changed files with 2 additions and 0 deletions
|
@ -12,6 +12,7 @@ import android.view.Menu
|
||||||
import android.view.MenuItem
|
import android.view.MenuItem
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import android.widget.FrameLayout
|
import android.widget.FrameLayout
|
||||||
|
import android.widget.Toast
|
||||||
import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog
|
import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog
|
||||||
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
import com.simplemobiletools.commons.dialogs.FilePickerDialog
|
||||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||||
|
@ -243,6 +244,7 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
|
||||||
val newFolder = File(config.tempFolderPath)
|
val newFolder = File(config.tempFolderPath)
|
||||||
if (newFolder.exists() && newFolder.isDirectory) {
|
if (newFolder.exists() && newFolder.isDirectory) {
|
||||||
if (newFolder.list()?.isEmpty() == true) {
|
if (newFolder.list()?.isEmpty() == true) {
|
||||||
|
toast(String.format(getString(R.string.deleting_folder), config.tempFolderPath), Toast.LENGTH_LONG)
|
||||||
tryDeleteFileDirItem(newFolder.toFileDirItem(applicationContext), true)
|
tryDeleteFileDirItem(newFolder.toFileDirItem(applicationContext), true)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue