AppLinksFragment: Update button state when link is removed

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2024-04-01 15:02:43 +05:30
parent eff596be13
commit ed4e8c8430

View File

@@ -70,11 +70,13 @@ class AppLinksFragment : Fragment(R.layout.fragment_app_links) {
private fun updateButtonState() {
if (isSAndAbove()) {
buttons.forEach { (domain, button) ->
if (domainVerified(domain)) {
button.apply {
text = getString(R.string.action_enabled)
isEnabled = false
button.apply {
text = if (domainVerified(domain)) {
getString(R.string.action_enabled)
} else {
getString(R.string.action_enable)
}
isEnabled = !domainVerified(domain)
}
}
} else {