From 2b8d644388d8b42df2b3edd009fc22b7750da3ef Mon Sep 17 00:00:00 2001 From: tibbi Date: Mon, 5 Dec 2016 23:46:55 +0100 Subject: [PATCH] fix some issues at Moving files --- .../com/simplemobiletools/gallery/dialogs/CopyDialog.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt index 45c27ef17..c52ba95c8 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/dialogs/CopyDialog.kt @@ -90,10 +90,11 @@ class CopyDialog(val activity: SimpleActivity, val files: ArrayList, val c if (file.renameTo(destination)) updatedFiles.add(destination) } - context.scanFiles(updatedFiles) { - dismiss() - copyMoveListener.copySucceeded(true, files.size * 2 == updatedFiles.size) + activity.runOnUiThread { + copyMoveListener.copySucceeded(true, files.size * 2 == updatedFiles.size) + dismiss() + } } } }