Refactor settings/preferencesearch/PreferenceSearchItem#allRelevantSearchFields
It doesn't need to return mutable list
This commit is contained in:
parent
70ab168b20
commit
62f224e01c
1 changed files with 3 additions and 4 deletions
|
|
@ -26,14 +26,13 @@ data class PreferenceSearchItem(
|
||||||
val breadcrumbs: String,
|
val breadcrumbs: String,
|
||||||
@XmlRes val searchIndexItemResId: Int
|
@XmlRes val searchIndexItemResId: Int
|
||||||
) {
|
) {
|
||||||
|
val allRelevantSearchFields: List<String>
|
||||||
|
get() = listOf(title, summary, entries, breadcrumbs)
|
||||||
|
|
||||||
fun hasData(): Boolean {
|
fun hasData(): Boolean {
|
||||||
return !key.isEmpty() && !title.isEmpty()
|
return !key.isEmpty() && !title.isEmpty()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getAllRelevantSearchFields(): MutableList<String?> {
|
|
||||||
return mutableListOf(title, summary, entries, breadcrumbs)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun toString(): String {
|
override fun toString(): String {
|
||||||
return "PreferenceItem: $title $summary $key"
|
return "PreferenceItem: $title $summary $key"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue