mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-27 06:57:59 +01:00
remove some explicit thread creations for toasts
This commit is contained in:
parent
2c73864d74
commit
64fa74f6cd
2 changed files with 2 additions and 7 deletions
|
@ -155,10 +155,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
|
||||||
private fun scanFinalPath(path: String) {
|
private fun scanFinalPath(path: String) {
|
||||||
scanPath(path) {
|
scanPath(path) {
|
||||||
setResult(Activity.RESULT_OK, intent)
|
setResult(Activity.RESULT_OK, intent)
|
||||||
runOnUiThread {
|
|
||||||
toast(R.string.file_saved)
|
toast(R.string.file_saved)
|
||||||
}
|
|
||||||
|
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -408,9 +408,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
|
||||||
val filtered = files.filter { it.exists() && it.isImageVideoGif() } as ArrayList
|
val filtered = files.filter { it.exists() && it.isImageVideoGif() } as ArrayList
|
||||||
deleteFiles(filtered) {
|
deleteFiles(filtered) {
|
||||||
if (!it) {
|
if (!it) {
|
||||||
runOnUiThread {
|
|
||||||
toast(R.string.unknown_error_occurred)
|
toast(R.string.unknown_error_occurred)
|
||||||
}
|
|
||||||
} else if (mMedia.isEmpty()) {
|
} else if (mMedia.isEmpty()) {
|
||||||
finish()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue