Refactor settings/preferencesearch/PreferenceSearchItem#allRelevantSearchFields

It doesn't need to return mutable list
This commit is contained in:
Yevhen Babiichuk (DustDFG) 2026-02-09 17:04:55 +02:00
parent 6214ae33f3
commit 21f446a78e

View File

@ -26,14 +26,13 @@ data class PreferenceSearchItem(
val breadcrumbs: String,
@XmlRes val searchIndexItemResId: Int
) {
val allRelevantSearchFields: List<String>
get() = listOf(title, summary, entries, breadcrumbs)
fun hasData(): Boolean {
return !key.isEmpty() && !title.isEmpty()
}
fun getAllRelevantSearchFields(): MutableList<String?> {
return mutableListOf(title, summary, entries, breadcrumbs)
}
override fun toString(): String {
return "PreferenceItem: $title $summary $key"
}