mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Improved the copy/move after choosing the storage
This commit is contained in:
parent
b4e2a68944
commit
daf2596fd8
@ -162,6 +162,10 @@ class CopyMoveFileHandler @Inject constructor(
|
||||
else EXTERNAL_SELECT_POSITION
|
||||
)
|
||||
}
|
||||
performCopyMoveOperation()
|
||||
}
|
||||
|
||||
private fun performCopyMoveOperation() {
|
||||
if (validateZimFileCanCopyOrMove()) {
|
||||
if (isMoveOperation) {
|
||||
performMoveOperation()
|
||||
@ -198,7 +202,7 @@ class CopyMoveFileHandler @Inject constructor(
|
||||
|
||||
fun handleDetectingFileSystemState() {
|
||||
if (isBookLessThan4GB()) {
|
||||
showCopyMoveDialog()
|
||||
performCopyMoveOperation()
|
||||
} else {
|
||||
showPreparingCopyMoveDialog()
|
||||
observeFileSystemState()
|
||||
@ -207,7 +211,7 @@ class CopyMoveFileHandler @Inject constructor(
|
||||
|
||||
fun handleCannotWrite4GbFileState() {
|
||||
if (isBookLessThan4GB()) {
|
||||
showCopyMoveDialog()
|
||||
performCopyMoveOperation()
|
||||
} else {
|
||||
// Show an error dialog indicating the file system limitation
|
||||
fileCopyMoveCallback?.filesystemDoesNotSupportedCopyMoveFilesOver4GB()
|
||||
@ -221,7 +225,7 @@ class CopyMoveFileHandler @Inject constructor(
|
||||
.subscribe {
|
||||
hidePreparingCopyMoveDialog()
|
||||
if (validateZimFileCanCopyOrMove()) {
|
||||
showCopyMoveDialog()
|
||||
performCopyMoveOperation()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user