Skip to content

Commit 21f446a

Browse files
author
Yevhen Babiichuk (DustDFG)
committed
Refactor settings/preferencesearch/PreferenceSearchItem#allRelevantSearchFields
It doesn't need to return mutable list
1 parent 6214ae3 commit 21f446a

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

app/src/main/java/org/schabi/newpipe/settings/preferencesearch/PreferenceSearchItem.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,13 @@ data class PreferenceSearchItem(
2626
val breadcrumbs: String,
2727
@XmlRes val searchIndexItemResId: Int
2828
) {
29+
val allRelevantSearchFields: List<String>
30+
get() = listOf(title, summary, entries, breadcrumbs)
31+
2932
fun hasData(): Boolean {
3033
return !key.isEmpty() && !title.isEmpty()
3134
}
3235

33-
fun getAllRelevantSearchFields(): MutableList<String?> {
34-
return mutableListOf(title, summary, entries, breadcrumbs)
35-
}
36-
3736
override fun toString(): String {
3837
return "PreferenceItem: $title $summary $key"
3938
}

0 commit comments

Comments
 (0)