add space to default search string (#1750)

This commit is contained in:
Ryan Nystrom
2018-04-22 13:41:04 -04:00
committed by GitHub
parent 79f4ac9106
commit 518824f634

View File

@@ -24,7 +24,7 @@ SearchBarSectionControllerDelegate {
private let type: RepositoryIssuesType
private let searchKey: ListDiffable = "searchKey" as ListDiffable
private let debouncer = Debouncer()
private var previousSearchString = "is:open"
private var previousSearchString = "is:open "
init(client: GithubClient, repo: RepositoryDetails, type: RepositoryIssuesType) {
self.repo = repo
@@ -81,9 +81,8 @@ SearchBarSectionControllerDelegate {
// MARK: SearchBarSectionControllerDelegate
func didChangeSelection(sectionController: SearchBarSectionController, query: String) {
let trimmed = query.trimmingCharacters(in: .whitespacesAndNewlines)
guard previousSearchString != trimmed else { return }
previousSearchString = trimmed
guard previousSearchString != query else { return }
previousSearchString = query
debouncer.action = { [weak self] in self?.fetch(page: nil) }
}