mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-04 03:06:41 -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
|
else EXTERNAL_SELECT_POSITION
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
performCopyMoveOperation()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun performCopyMoveOperation() {
|
||||||
if (validateZimFileCanCopyOrMove()) {
|
if (validateZimFileCanCopyOrMove()) {
|
||||||
if (isMoveOperation) {
|
if (isMoveOperation) {
|
||||||
performMoveOperation()
|
performMoveOperation()
|
||||||
@ -198,7 +202,7 @@ class CopyMoveFileHandler @Inject constructor(
|
|||||||
|
|
||||||
fun handleDetectingFileSystemState() {
|
fun handleDetectingFileSystemState() {
|
||||||
if (isBookLessThan4GB()) {
|
if (isBookLessThan4GB()) {
|
||||||
showCopyMoveDialog()
|
performCopyMoveOperation()
|
||||||
} else {
|
} else {
|
||||||
showPreparingCopyMoveDialog()
|
showPreparingCopyMoveDialog()
|
||||||
observeFileSystemState()
|
observeFileSystemState()
|
||||||
@ -207,7 +211,7 @@ class CopyMoveFileHandler @Inject constructor(
|
|||||||
|
|
||||||
fun handleCannotWrite4GbFileState() {
|
fun handleCannotWrite4GbFileState() {
|
||||||
if (isBookLessThan4GB()) {
|
if (isBookLessThan4GB()) {
|
||||||
showCopyMoveDialog()
|
performCopyMoveOperation()
|
||||||
} else {
|
} else {
|
||||||
// Show an error dialog indicating the file system limitation
|
// Show an error dialog indicating the file system limitation
|
||||||
fileCopyMoveCallback?.filesystemDoesNotSupportedCopyMoveFilesOver4GB()
|
fileCopyMoveCallback?.filesystemDoesNotSupportedCopyMoveFilesOver4GB()
|
||||||
@ -221,7 +225,7 @@ class CopyMoveFileHandler @Inject constructor(
|
|||||||
.subscribe {
|
.subscribe {
|
||||||
hidePreparingCopyMoveDialog()
|
hidePreparingCopyMoveDialog()
|
||||||
if (validateZimFileCanCopyOrMove()) {
|
if (validateZimFileCanCopyOrMove()) {
|
||||||
showCopyMoveDialog()
|
performCopyMoveOperation()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user