mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2026-06-02 02:32:10 +00:00
Refactor settings/preferencesearch/PreferenceSearchItem#allRelevantSearchFields
It doesn't need to return mutable list
This commit is contained in:
+3
-4
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user