修复线程设置布局错误。
This commit is contained in:
parent
e93d08b56f
commit
6582e8257c
@ -146,9 +146,11 @@ class PdfResultActivity : BaseActivity() {
|
||||
}
|
||||
if (source == PdfPickerSource.SPLIT) {
|
||||
val splitPassword = intent.getStringExtra(EXTRA_SPLIT_PASSWORD) ?: ""
|
||||
runOnUiThread {
|
||||
binding.progressBar.isIndeterminate = false
|
||||
binding.progressBar.progress = 0
|
||||
binding.progressBar.max = 100
|
||||
}
|
||||
val selectedList: ArrayList<PdfSelectedPagesItem> =
|
||||
requireParcelableArrayList(EXTRA_SELECTED_LIST)
|
||||
if (selectedList.isEmpty()) {
|
||||
@ -190,9 +192,11 @@ class PdfResultActivity : BaseActivity() {
|
||||
}
|
||||
}
|
||||
} else if (source == PdfPickerSource.MERGE) {
|
||||
runOnUiThread {
|
||||
binding.progressBar.isIndeterminate = false
|
||||
binding.progressBar.progress = 0
|
||||
binding.progressBar.max = 100
|
||||
}
|
||||
val mergeInputFile: ArrayList<PdfDocumentEntity> =
|
||||
requireParcelableArrayList(EXTRA_MERGE_LIST)
|
||||
if (mergeInputFile.isEmpty()) {
|
||||
@ -235,7 +239,9 @@ class PdfResultActivity : BaseActivity() {
|
||||
return@launch
|
||||
}
|
||||
val lockPassword = intent.getStringExtra(EXTRA_LOCK_UNLOCK_PASSWORD) ?: ""
|
||||
runOnUiThread {
|
||||
binding.congratulationsDesc.text = getString(R.string.set_password_successfully)
|
||||
}
|
||||
PdfSecurityUtils.setPasswordToPdfWithProgress(
|
||||
filepath, lockPassword, lockPassword
|
||||
) { progress ->
|
||||
@ -255,7 +261,9 @@ class PdfResultActivity : BaseActivity() {
|
||||
return@launch
|
||||
}
|
||||
val unlockPassword = intent.getStringExtra(EXTRA_LOCK_UNLOCK_PASSWORD) ?: ""
|
||||
runOnUiThread {
|
||||
binding.congratulationsDesc.text = getString(R.string.remove_password_successfully)
|
||||
}
|
||||
PdfSecurityUtils.removePasswordFromPdfWithProgress(
|
||||
filepath, unlockPassword
|
||||
) { progress ->
|
||||
@ -304,7 +312,9 @@ class PdfResultActivity : BaseActivity() {
|
||||
finish()
|
||||
return@launch
|
||||
}
|
||||
runOnUiThread {
|
||||
binding.congratulationsDesc.text = getString(R.string.converted_successfully)
|
||||
}
|
||||
val selectedPages: ArrayList<PdfPageItem> =
|
||||
requireParcelableArrayList(EXTRA_PDF_TO_IMAGE_LIST)
|
||||
val pdfToImgPassword = intent.getStringExtra(EXTRA_PDF_TO_IMAGE_PASSWORD) ?: ""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user