|
|
@ -256,18 +256,16 @@ class CacheActivity : VMBaseActivity<ActivityCacheBookBinding, CacheViewModel>() |
|
|
|
when (AppConfig.exportType) { |
|
|
|
when (AppConfig.exportType) { |
|
|
|
1 -> viewModel.exportEPUB(path, book) { |
|
|
|
1 -> viewModel.exportEPUB(path, book) { |
|
|
|
exportSize-- |
|
|
|
exportSize-- |
|
|
|
|
|
|
|
toastOnUi(it) |
|
|
|
if (exportSize <= 0) { |
|
|
|
if (exportSize <= 0) { |
|
|
|
binding.titleBar.snackbar(it) |
|
|
|
binding.titleBar.snackbar(R.string.complete) |
|
|
|
} else { |
|
|
|
|
|
|
|
toastOnUi(it) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else -> viewModel.export(path, book) { |
|
|
|
else -> viewModel.export(path, book) { |
|
|
|
exportSize-- |
|
|
|
exportSize-- |
|
|
|
|
|
|
|
toastOnUi(it) |
|
|
|
if (exportSize <= 0) { |
|
|
|
if (exportSize <= 0) { |
|
|
|
binding.titleBar.snackbar(it) |
|
|
|
binding.titleBar.snackbar(R.string.complete) |
|
|
|
} else { |
|
|
|
|
|
|
|
toastOnUi(it) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|