Fix inability to create a backup
This commit is contained in:
committed by
Koitharu
parent
174c6649e0
commit
7618a05162
@@ -14,6 +14,7 @@ import org.koitharu.kotatsu.R
|
||||
import org.koitharu.kotatsu.base.ui.AlertDialogFragment
|
||||
import org.koitharu.kotatsu.databinding.DialogProgressBinding
|
||||
import org.koitharu.kotatsu.utils.ext.getDisplayMessage
|
||||
import org.koitharu.kotatsu.utils.ext.setIndeterminateCompat
|
||||
import org.koitharu.kotatsu.utils.progress.Progress
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
@@ -64,8 +65,8 @@ class BackupDialogFragment : AlertDialogFragment<DialogProgressBinding>() {
|
||||
|
||||
private fun onProgressChanged(progress: Progress?) {
|
||||
with(binding.progressBar) {
|
||||
setIndeterminateCompat(progress == null)
|
||||
isVisible = true
|
||||
isIndeterminate = progress == null
|
||||
if (progress != null) {
|
||||
this.max = progress.total
|
||||
this.progress = progress.value
|
||||
|
||||
Reference in New Issue
Block a user