Skip to content

Commit

Permalink
fix: show progress views on corner case
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaizen-7 authored Mar 25, 2022
1 parent 3a9fae3 commit d82d99c
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,7 @@ class FirstActivity : AppCompatActivity(), View.OnClickListener,
binding.qrButton.background.alpha = 128
binding.resumeDownload.show()
binding.dateLastSyncText.text = getString(R.string.incompleteDownload)
binding.chunkCount.show()
binding.chunkSize.show()
binding.updateProgressBar.show()
showDownloadProgressViews()
} else {
binding.resumeDownload.hide()
}
Expand Down Expand Up @@ -533,9 +531,7 @@ class FirstActivity : AppCompatActivity(), View.OnClickListener,
PrefKeys.KEY_TOTAL_CHUNK -> {
val totalChunk = viewModel.getTotalChunk().toInt()
binding.updateProgressBar.max = totalChunk
binding.updateProgressBar.show()
binding.chunkCount.show()
binding.chunkSize.show()
showDownloadProgressViews()
updateDownloadedPackagesCount()
Log.i(PrefKeys.KEY_TOTAL_CHUNK, totalChunk.toString())
}
Expand All @@ -544,6 +540,8 @@ class FirstActivity : AppCompatActivity(), View.OnClickListener,
Log.i(PrefKeys.AUTH_TO_RESUME, authToResume.toString())
if (viewModel.getResumeAvailable() == 0L) {
binding.resumeDownload.show()
binding.dateLastSyncText.text = getString(R.string.incompleteDownload)
showDownloadProgressViews()
binding.qrButton.background.alpha = 128
}
}
Expand Down

0 comments on commit d82d99c

Please sign in to comment.