remove some explicit thread creations for toasts

This commit is contained in:
tibbi 2017-05-26 09:30:14 +02:00
parent 2c73864d74
commit 64fa74f6cd
2 changed files with 2 additions and 7 deletions

View file

@ -155,10 +155,7 @@ class EditActivity : SimpleActivity(), CropImageView.OnCropImageCompleteListener
private fun scanFinalPath(path: String) {
scanPath(path) {
setResult(Activity.RESULT_OK, intent)
runOnUiThread {
toast(R.string.file_saved)
}
finish()
}
}

View file

@ -408,9 +408,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
val filtered = files.filter { it.exists() && it.isImageVideoGif() } as ArrayList
deleteFiles(filtered) {
if (!it) {
runOnUiThread {
toast(R.string.unknown_error_occurred)
}
} else if (mMedia.isEmpty()) {
finish()
}