Browse Source

Fix: should stop all actions after onCopySuccess() is called

cooperku_kdanmobile 5 years ago
parent
commit
96741c1cae
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/main/java/com/kdanmobile/reader/copyfile/CopyFileViewModel.kt

+ 1 - 0
src/main/java/com/kdanmobile/reader/copyfile/CopyFileViewModel.kt

@@ -67,6 +67,7 @@ class CopyFileViewModel(applicationContext: Context,
 
             if (isSrcFileEqualsDstFile()) {
                 onCopySuccess()
+                return
             }
 
             val fullFileSize = Math.max(1, source?.getFileSize() ?: 1)