For #28298: Disable deletion of last element in search engines list
When removing search engines from settings, the option to delete the last one should not be available
This commit is contained in:
parent
6bff78b738
commit
073bbbf5c8
|
@ -83,7 +83,7 @@ class RadioSearchEngineListPreference @JvmOverloads constructor(
|
|||
engine = engine,
|
||||
layoutInflater = layoutInflater,
|
||||
res = context.resources,
|
||||
allowDeletion = state.searchEngines.size > 1,
|
||||
allowDeletion = state.searchEngines.count { it.type != SearchEngine.Type.APPLICATION } > 1,
|
||||
isSelected = engine == state.selectedOrDefaultSearchEngine,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue