diff --git a/Safari History Search.alfredworkflow b/Safari History Search.alfredworkflow index 9bd8734..51dd413 100644 Binary files a/Safari History Search.alfredworkflow and b/Safari History Search.alfredworkflow differ diff --git a/SafariHistorySearch.playground/Contents.swift b/SafariHistorySearch.playground/Contents.swift index 70a4767..afbfd53 100644 --- a/SafariHistorySearch.playground/Contents.swift +++ b/SafariHistorySearch.playground/Contents.swift @@ -30,29 +30,6 @@ struct HistoryItem { func alfredResult() -> AlfredResult? { return url != nil ? AlfredResult(fromHistoryItem: self) : nil } - - func contains(queries: [String]) -> Bool { - for query in queries { - if !contains(query) { - return false - } - } - return true - } - - func contains(query: String) -> Bool { - return matches(query, inString: self.name) || - matches(query, inString: self.url?.path) || - matches(query, inString: self.fullText) - } - - func matches(query: String, inString string: String?) -> Bool { - guard let stringToSearch = string else { - return false - } - - return stringToSearch.containsString(query) - } } struct AlfredResult { diff --git a/SafariHistorySearch.playground/playground.xcworkspace/xcuserdata/akaralar.xcuserdatad/UserInterfaceState.xcuserstate b/SafariHistorySearch.playground/playground.xcworkspace/xcuserdata/akaralar.xcuserdatad/UserInterfaceState.xcuserstate index 922d6f3..38b2550 100644 Binary files a/SafariHistorySearch.playground/playground.xcworkspace/xcuserdata/akaralar.xcuserdatad/UserInterfaceState.xcuserstate and b/SafariHistorySearch.playground/playground.xcworkspace/xcuserdata/akaralar.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/safariSearch b/safariSearch index 79ed613..a843ade 100755 Binary files a/safariSearch and b/safariSearch differ diff --git a/safariSearch.swift b/safariSearch.swift index 42dfa6a..765027e 100755 --- a/safariSearch.swift +++ b/safariSearch.swift @@ -29,30 +29,7 @@ struct HistoryItem { func alfredResult() -> AlfredResult? { return url != nil ? AlfredResult(fromHistoryItem: self) : nil - } - - func contains(queries: [String]) -> Bool { - for query in queries { - if !contains(query) { - return false - } - } - return true - } - - func contains(query: String) -> Bool { - return matches(query, inString: self.name) || - matches(query, inString: self.url?.path) || - matches(query, inString: self.fullText) - } - - func matches(query: String, inString string: String?) -> Bool { - guard let stringToSearch = string else { - return false - } - - return stringToSearch.containsString(query) - } + } } struct AlfredResult {