2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-09 19:10:42 +00:00

For #4199 make checkbox disabled when there is no data (#4200)

* For #4199 make checkbox unclickable when there is no data
This commit is contained in:
Nikit Bhandari 2019-08-03 06:12:39 +05:30 committed by Emily Kager
parent bcf2288a88
commit 1cb9f88787

View File

@ -150,6 +150,7 @@ class DeleteBrowsingDataFragment : Fragment() {
view?.open_tabs_item?.apply { view?.open_tabs_item?.apply {
val openTabs = requireComponents.core.sessionManager.sessions.size val openTabs = requireComponents.core.sessionManager.sessions.size
subtitleView.text = resources.getString(R.string.preferences_delete_browsing_data_tabs_subtitle, openTabs) subtitleView.text = resources.getString(R.string.preferences_delete_browsing_data_tabs_subtitle, openTabs)
isEnabled = openTabs > 0
} }
} }
@ -165,6 +166,7 @@ class DeleteBrowsingDataFragment : Fragment() {
R.string.preferences_delete_browsing_data_browsing_data_subtitle, R.string.preferences_delete_browsing_data_browsing_data_subtitle,
historyCount historyCount
) )
isEnabled = historyCount > 0
} }
} }
} }
@ -182,6 +184,7 @@ class DeleteBrowsingDataFragment : Fragment() {
R.string.preferences_delete_browsing_data_collections_subtitle, R.string.preferences_delete_browsing_data_collections_subtitle,
collectionsCount collectionsCount
) )
isEnabled = collectionsCount > 0
} }
} }
} }