update search query to handle multiple labels

This commit is contained in:
Satindar Dhillon
2022-04-10 21:38:36 -07:00
parent be68971a03
commit d68c8e5e33

View File

@ -204,8 +204,9 @@ final class HomeFeedViewModel: ObservableObject {
var query = searchTerm
for label in selectedLabels {
query.append(" label:\(label.name)")
if !selectedLabels.isEmpty {
query.append(" label:")
query.append(selectedLabels.map(\.name).joined(separator: ","))
}
return query