Always make hashtag filters lowercased
Changelog-Fixed: Fix case sensitivity when searching hashtags Closes: #737
This commit is contained in:
committed by
William Casarin
parent
721bb9abf5
commit
06c2741bf4
@@ -37,7 +37,7 @@ struct NostrFilter: Codable, Equatable {
|
||||
}
|
||||
|
||||
public static func filter_hashtag(_ htags: [String]) -> NostrFilter {
|
||||
return NostrFilter(ids: nil, kinds: nil, referenced_ids: nil, pubkeys: nil, since: nil, until: nil, authors: nil, hashtag: htags)
|
||||
return NostrFilter(ids: nil, kinds: nil, referenced_ids: nil, pubkeys: nil, since: nil, until: nil, authors: nil, hashtag: htags.map { $0.lowercased() })
|
||||
}
|
||||
|
||||
public static var filter_text: NostrFilter {
|
||||
|
||||
@@ -137,7 +137,7 @@ func decode_nostr_uri(_ s: String) -> NostrLink? {
|
||||
}
|
||||
|
||||
if tag_is_hashtag(parts) {
|
||||
return .filter(NostrFilter.filter_hashtag([parts[1].lowercased()]))
|
||||
return .filter(NostrFilter.filter_hashtag([parts[1]]))
|
||||
}
|
||||
|
||||
if let rid = tag_to_refid(parts) {
|
||||
|
||||
@@ -83,9 +83,6 @@ struct SearchHomeView: View {
|
||||
}
|
||||
.background(colorScheme == .dark ? Color.black : Color.white)
|
||||
}
|
||||
.onChange(of: search) { s in
|
||||
print("search change 1")
|
||||
}
|
||||
.onReceive(handle_notify(.new_mutes)) { _ in
|
||||
self.model.filter_muted()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user