change the toast message from Deleting to Moving to Recycle Bin when appropriate
This commit is contained in:
parent
e20013e982
commit
1c38f74ae7
3 changed files with 8 additions and 5 deletions
|
@ -43,7 +43,7 @@ android {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:4.8.4'
|
||||
implementation 'com.simplemobiletools:commons:4.8.5'
|
||||
implementation 'com.theartofdev.edmodo:android-image-cropper:2.7.0'
|
||||
implementation 'com.android.support:multidex:1.0.3'
|
||||
implementation 'it.sephiroth.android.exif:library:1.0.1'
|
||||
|
|
|
@ -425,7 +425,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
|
|||
fileDirItems.isEmpty() -> return
|
||||
fileDirItems.size == 1 -> toast(String.format(getString(R.string.deleting_folder), fileDirItems.first().name))
|
||||
else -> {
|
||||
val deletingItems = resources.getQuantityString(R.plurals.deleting_items, fileDirItems.size, fileDirItems.size)
|
||||
val baseString = if (config.useRecycleBin) R.plurals.moving_items_into_bin else R.plurals.delete_items
|
||||
val deletingItems = resources.getQuantityString(baseString, fileDirItems.size, fileDirItems.size)
|
||||
toast(deletingItems)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -837,10 +837,10 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
return
|
||||
}
|
||||
|
||||
val deletingItems = resources.getQuantityString(R.plurals.deleting_items, filtered.size, filtered.size)
|
||||
toast(deletingItems)
|
||||
|
||||
if (config.useRecycleBin && !filtered.first().path.startsWith(filesDir.absolutePath)) {
|
||||
val movingItems = resources.getQuantityString(R.plurals.moving_items_into_bin, filtered.size, filtered.size)
|
||||
toast(movingItems)
|
||||
|
||||
movePathsInRecycleBin(filtered.map { it.path } as ArrayList<String>, mMediumDao) {
|
||||
if (it) {
|
||||
deleteFilteredFiles(filtered)
|
||||
|
@ -849,6 +849,8 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
val deletingItems = resources.getQuantityString(R.plurals.deleting_items, filtered.size, filtered.size)
|
||||
toast(deletingItems)
|
||||
deleteFilteredFiles(filtered)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue