save the images on a background thread
This commit is contained in:
parent
972916f6b2
commit
4786fc7c54
1 changed files with 20 additions and 18 deletions
|
@ -232,6 +232,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
private fun saveImageAs() {
|
private fun saveImageAs() {
|
||||||
val currPath = getCurrentPath()
|
val currPath = getCurrentPath()
|
||||||
SaveAsDialog(this, currPath) {
|
SaveAsDialog(this, currPath) {
|
||||||
|
Thread({
|
||||||
val selectedFile = File(it)
|
val selectedFile = File(it)
|
||||||
val tmpFile = File(selectedFile.parent, "tmp_${it.getFilenameFromPath()}")
|
val tmpFile = File(selectedFile.parent, "tmp_${it.getFilenameFromPath()}")
|
||||||
try {
|
try {
|
||||||
|
@ -253,6 +254,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
||||||
toast(R.string.unknown_error_occurred)
|
toast(R.string.unknown_error_occurred)
|
||||||
deleteFile(tmpFile) {}
|
deleteFile(tmpFile) {}
|
||||||
}
|
}
|
||||||
|
}).start()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue