2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-19 09:25:34 +00:00
* Fixes https://github.com/mozilla-mobile/fenix/issues/4704. Overrides `setEnabled` for DeleteBrowsingDataItem to change view alpha when disabled and to toggle the checkbox `isEnabled` behavior based on the value provided.

* Updates CHANGELOG.md

* Removes unnecessary disabling of checkbox in DeleteBrowsingDataItem.kt
Updates CHANGELOG.md to reflect the component changed.
This commit is contained in:
Suraj Shah 2019-08-19 21:53:12 +05:30 committed by Jeff Boek
parent 43e4bcc0b1
commit f3a412e24e
2 changed files with 11 additions and 0 deletions

View File

@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Added ### Added
- #4704 - Adds ability to show a different alpha when no elements available to be deleted for a delete browsing data item
- #4137 - Adds pagination to the history view - #4137 - Adds pagination to the history view
- #3695 - Made search suggestions for other tabs clickable - #3695 - Made search suggestions for other tabs clickable

View File

@ -19,6 +19,11 @@ class DeleteBrowsingDataItem @JvmOverloads constructor(
defStyleAttr: Int = 0 defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) { ) : ConstraintLayout(context, attrs, defStyleAttr) {
private companion object {
private const val ENABLED_ALPHA = 1f
private const val DISABLED_ALPHA = 0.6f
}
val titleView: TextView val titleView: TextView
get() = title get() = title
@ -61,4 +66,9 @@ class DeleteBrowsingDataItem @JvmOverloads constructor(
subtitle.text = resources.getString(subtitleId) subtitle.text = resources.getString(subtitleId)
} }
} }
override fun setEnabled(enabled: Boolean) {
super.setEnabled(enabled)
alpha = if (enabled) ENABLED_ALPHA else DISABLED_ALPHA
}
} }