mirror of
https://github.com/openflocon/Flocon.git
synced 2026-06-24 00:49:11 +00:00
refact: [NETWORK] removed filter from ui (#299)
Co-authored-by: Florent Champigny <florent@bere.al>
This commit is contained in:
parent
57cc3e9711
commit
29fe73f63f
6 changed files with 45 additions and 84 deletions
|
|
@ -71,7 +71,7 @@ class NetworkLocalDataSourceRoom(
|
|||
appendLine(")")
|
||||
}
|
||||
|
||||
filter.filters?.forEach { filter ->
|
||||
filter.textsFilters?.forEach { filter ->
|
||||
filter.includedFilters.takeIf { it.isNotEmpty() }?.let { included ->
|
||||
appendLine("AND (")
|
||||
included.forEachIndexed { includedFilterIndex, filterItem ->
|
||||
|
|
@ -98,6 +98,19 @@ class NetworkLocalDataSourceRoom(
|
|||
}
|
||||
}
|
||||
|
||||
filter.methodFilter?.takeIf { it.isNotEmpty() }?.let { methodFilter ->
|
||||
appendLine("AND (")
|
||||
methodFilter.forEachIndexed { includedFilterIndex, filterItem ->
|
||||
appendLine("\trequest_methodFormatted LIKE ? COLLATE NOCASE")
|
||||
args.add("%${filterItem}%")
|
||||
|
||||
if (includedFilterIndex != methodFilter.lastIndex) {
|
||||
appendLine("\tOR")
|
||||
}
|
||||
}
|
||||
appendLine(")")
|
||||
}
|
||||
|
||||
appendLine("ORDER BY $safeColumnName $sortOrder")
|
||||
}.trimIndent()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue