Skip to content
This repository was archived by the owner on Jul 10, 2023. It is now read-only.

Commit 9a66ac5

Browse files
committed
Remove unnecessary code and update the workflow
1 parent 8682f90 commit 9a66ac5

File tree

5 files changed

+1
-47
lines changed

5 files changed

+1
-47
lines changed
-1000 Bytes
Binary file not shown.

SafariHistorySearch.playground/Contents.swift

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,6 @@ struct HistoryItem {
3030
func alfredResult() -> AlfredResult? {
3131
return url != nil ? AlfredResult(fromHistoryItem: self) : nil
3232
}
33-
34-
func contains(queries: [String]) -> Bool {
35-
for query in queries {
36-
if !contains(query) {
37-
return false
38-
}
39-
}
40-
return true
41-
}
42-
43-
func contains(query: String) -> Bool {
44-
return matches(query, inString: self.name) ||
45-
matches(query, inString: self.url?.path) ||
46-
matches(query, inString: self.fullText)
47-
}
48-
49-
func matches(query: String, inString string: String?) -> Bool {
50-
guard let stringToSearch = string else {
51-
return false
52-
}
53-
54-
return stringToSearch.containsString(query)
55-
}
5633
}
5734

5835
struct AlfredResult {

safariSearch

-328 Bytes
Binary file not shown.

safariSearch.swift

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -29,30 +29,7 @@ struct HistoryItem {
2929

3030
func alfredResult() -> AlfredResult? {
3131
return url != nil ? AlfredResult(fromHistoryItem: self) : nil
32-
}
33-
34-
func contains(queries: [String]) -> Bool {
35-
for query in queries {
36-
if !contains(query) {
37-
return false
38-
}
39-
}
40-
return true
41-
}
42-
43-
func contains(query: String) -> Bool {
44-
return matches(query, inString: self.name) ||
45-
matches(query, inString: self.url?.path) ||
46-
matches(query, inString: self.fullText)
47-
}
48-
49-
func matches(query: String, inString string: String?) -> Bool {
50-
guard let stringToSearch = string else {
51-
return false
52-
}
53-
54-
return stringToSearch.containsString(query)
55-
}
32+
}
5633
}
5734

5835
struct AlfredResult {

0 commit comments

Comments
 (0)