Fix crash when searching for "from:me"
This commit is contained in:
parent
bf27b8fd47
commit
5cef76e494
|
@ -88,7 +88,7 @@ class MastodonSearchController: UISearchController {
|
|||
if searchText.isEmpty || "from:me".contains(searchText) {
|
||||
fromSuggestions.append("from:me")
|
||||
}
|
||||
if searchText != "me",
|
||||
if searchText != "me" && searchText != "from:me",
|
||||
let match = acctRegex.firstMatch(in: searchText, range: NSRange(location: 0, length: searchText.utf16.count)) {
|
||||
let matched = (searchText as NSString).substring(with: match.range)
|
||||
fromSuggestions.append("from:\(matched)")
|
||||
|
|
Loading…
Reference in New Issue