mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Fix formatting of label search
This commit is contained in:
parent
76c094b1ba
commit
e38037da58
1 changed files with 12 additions and 2 deletions
|
|
@ -385,12 +385,22 @@ import Views
|
|||
|
||||
if !selectedLabels.isEmpty {
|
||||
query.append(" label:")
|
||||
query.append(selectedLabels.map { $0.name != nil ? "\"\(String(describing: $0.name))\"" : "" }.joined(separator: ","))
|
||||
query.append(selectedLabels.compactMap { label in
|
||||
if let name = label.name {
|
||||
return "\"\(name)\""
|
||||
}
|
||||
return nil
|
||||
}.joined(separator: ","))
|
||||
}
|
||||
|
||||
if !negatedLabels.isEmpty {
|
||||
query.append(" !label:")
|
||||
query.append(negatedLabels.map { $0.name != nil ? "\"\(String(describing: $0.name))\"" : "" }.joined(separator: ","))
|
||||
query.append(negatedLabels.compactMap { label in
|
||||
if let name = label.name {
|
||||
return "\"\(name)\""
|
||||
}
|
||||
return nil
|
||||
}.joined(separator: ","))
|
||||
}
|
||||
|
||||
print("QUERY: `\(query)`")
|
||||
|
|
|
|||
Loading…
Reference in a new issue