Refactor settings/preferencesearch/PreferenceSearchItem#allRelevantSearchFields
It doesn't need to return mutable list
This commit is contained in:
parent
6214ae33f3
commit
21f446a78e
@ -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"
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user