mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-17 15:26:23 +00:00
[fenix] Bug 1802619: Disable delete browsing data button when deletion in progress
This commit is contained in:
parent
138b3ce6f4
commit
adf083cd03
@ -114,8 +114,8 @@ class DeleteBrowsingDataFragment : Fragment(R.layout.fragment_delete_browsing_da
|
||||
updateItemCounts()
|
||||
}
|
||||
|
||||
private fun updateDeleteButton() {
|
||||
val enabled = getCheckboxes().any { it.isChecked }
|
||||
private fun updateDeleteButton(deleteInProgress: Boolean = false) {
|
||||
val enabled = getCheckboxes().any { it.isChecked } && !deleteInProgress
|
||||
|
||||
binding.deleteData.isEnabled = enabled
|
||||
binding.deleteData.alpha = if (enabled) ENABLED_ALPHA else DISABLED_ALPHA
|
||||
@ -167,6 +167,7 @@ class DeleteBrowsingDataFragment : Fragment(R.layout.fragment_delete_browsing_da
|
||||
}
|
||||
|
||||
private fun startDeletion() {
|
||||
updateDeleteButton(deleteInProgress = true)
|
||||
binding.progressBar.visibility = View.VISIBLE
|
||||
binding.deleteBrowsingDataWrapper.isEnabled = false
|
||||
binding.deleteBrowsingDataWrapper.isClickable = false
|
||||
@ -174,6 +175,7 @@ class DeleteBrowsingDataFragment : Fragment(R.layout.fragment_delete_browsing_da
|
||||
}
|
||||
|
||||
private fun finishDeletion() {
|
||||
updateDeleteButton(deleteInProgress = false)
|
||||
val popAfter = binding.openTabsItem.isChecked
|
||||
binding.progressBar.visibility = View.GONE
|
||||
binding.deleteBrowsingDataWrapper.isEnabled = true
|
||||
|
Loading…
Reference in New Issue
Block a user