mirror of
https://github.com/kean/Pulse.git
synced 2026-05-30 21:07:33 +00:00
Fix pbxproj
This commit is contained in:
@@ -118,9 +118,7 @@
|
||||
0CB63A232974A64500525165 /* ConsoleSearchOperation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB63A222974A64500525165 /* ConsoleSearchOperation.swift */; };
|
||||
0CB63A2729759D2E00525165 /* ConsoleSearchToken.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB63A2629759D2E00525165 /* ConsoleSearchToken.swift */; };
|
||||
0CB63A292975A94D00525165 /* ConsoleSearchTokenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB63A282975A94D00525165 /* ConsoleSearchTokenTests.swift */; };
|
||||
0CB63A2C2975C40100525165 /* ConsoleSearchFilter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB63A2A2975C3C700525165 /* ConsoleSearchFilter.swift */; };
|
||||
0CB63A2F2975C43D00525165 /* ConsoleSearchScope.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB63A2D2975C40F00525165 /* ConsoleSearchScope.swift */; };
|
||||
0CB63A352976028F00525165 /* ConsoleSearchFilter+Parsers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CB63A332976028B00525165 /* ConsoleSearchFilter+Parsers.swift */; };
|
||||
0CBEF6A629DF69EB00132FB3 /* ConsoleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CBEF6A429DF69E800132FB3 /* ConsoleView.swift */; };
|
||||
0CC0130E2A2D26BA00A6DF0B /* RemoteLoggerErrorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC0130D2A2D26BA00A6DF0B /* RemoteLoggerErrorView.swift */; };
|
||||
0CC3808329F419C700EF22EE /* ConsoleLabelsSelectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CC3808229F419C700EF22EE /* ConsoleLabelsSelectionView.swift */; };
|
||||
@@ -574,9 +572,7 @@
|
||||
0CB63A222974A64500525165 /* ConsoleSearchOperation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsoleSearchOperation.swift; sourceTree = "<group>"; };
|
||||
0CB63A2629759D2E00525165 /* ConsoleSearchToken.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsoleSearchToken.swift; sourceTree = "<group>"; };
|
||||
0CB63A282975A94D00525165 /* ConsoleSearchTokenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsoleSearchTokenTests.swift; sourceTree = "<group>"; };
|
||||
0CB63A2A2975C3C700525165 /* ConsoleSearchFilter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsoleSearchFilter.swift; sourceTree = "<group>"; };
|
||||
0CB63A2D2975C40F00525165 /* ConsoleSearchScope.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsoleSearchScope.swift; sourceTree = "<group>"; };
|
||||
0CB63A332976028B00525165 /* ConsoleSearchFilter+Parsers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ConsoleSearchFilter+Parsers.swift"; sourceTree = "<group>"; };
|
||||
0CBEF6A429DF69E800132FB3 /* ConsoleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsoleView.swift; sourceTree = "<group>"; };
|
||||
0CC0130D2A2D26BA00A6DF0B /* RemoteLoggerErrorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemoteLoggerErrorView.swift; sourceTree = "<group>"; };
|
||||
0CC3808229F419C700EF22EE /* ConsoleLabelsSelectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsoleLabelsSelectionView.swift; sourceTree = "<group>"; };
|
||||
@@ -1042,8 +1038,6 @@
|
||||
0CB63A202974A62700525165 /* ConsoleSearchOccurrence.swift */,
|
||||
0C2343142978B6B900AE7CE6 /* ConsoleSearchSuggestionsService.swift */,
|
||||
0CB63A2629759D2E00525165 /* ConsoleSearchToken.swift */,
|
||||
0CB63A2A2975C3C700525165 /* ConsoleSearchFilter.swift */,
|
||||
0CB63A332976028B00525165 /* ConsoleSearchFilter+Parsers.swift */,
|
||||
0CB63A2D2975C40F00525165 /* ConsoleSearchScope.swift */,
|
||||
0C63A3772979FE3A00F6A6A5 /* ConsoleSearchTerm.swift */,
|
||||
0CB63A222974A64500525165 /* ConsoleSearchOperation.swift */,
|
||||
@@ -2049,7 +2043,6 @@
|
||||
0CF0D675296F189600EED9D4 /* NetworkInspectorView-ios-visionos-macos.swift in Sources */,
|
||||
0CF0D64A296F189600EED9D4 /* ConsoleSection.swift in Sources */,
|
||||
0CB63A132973A12300525165 /* ConsoleSearchListContentView.swift in Sources */,
|
||||
0CB63A2C2975C40100525165 /* ConsoleSearchFilter.swift in Sources */,
|
||||
0CB63A2729759D2E00525165 /* ConsoleSearchToken.swift in Sources */,
|
||||
0CF0D679296F189600EED9D4 /* ConsoleView-ios.swift in Sources */,
|
||||
0CF0D661296F189600EED9D4 /* NetworkInspectorTransferInfoView.swift in Sources */,
|
||||
@@ -2065,7 +2058,6 @@
|
||||
0CF0D659296F189600EED9D4 /* UserSettings.swift in Sources */,
|
||||
0C7A0DFB297C33F300B4B69D /* ConsoleRouterView.swift in Sources */,
|
||||
0CF0D61B296F189600EED9D4 /* ShareItems.swift in Sources */,
|
||||
0CB63A352976028F00525165 /* ConsoleSearchFilter+Parsers.swift in Sources */,
|
||||
0CF0D623296F189600EED9D4 /* SearchBar-macos.swift in Sources */,
|
||||
0CF0D652296F189600EED9D4 /* ConsoleSearchCriteria+Predicates.swift in Sources */,
|
||||
0CF0D613296F189600EED9D4 /* TextRendererHTML.swift in Sources */,
|
||||
|
||||
@@ -11,17 +11,14 @@ final class ConsoleSearchRecentSearchesStore {
|
||||
private let mode: ConsoleMode
|
||||
|
||||
private(set) var searches: [ConsoleSearchTerm] = []
|
||||
private(set) var filters: [ConsoleSearchFilter] = []
|
||||
|
||||
init(mode: ConsoleMode) {
|
||||
self.mode = mode
|
||||
|
||||
self.searches = decode([ConsoleSearchTerm].self, from: UserDefaults.standard.string(forKey: searchesKey) ?? "[]") ?? []
|
||||
self.filters = decode([ConsoleSearchFilter].self, from: UserDefaults.standard.string(forKey: filtersKey) ?? "[]") ?? []
|
||||
}
|
||||
|
||||
private var searchesKey: String { "\(mode.rawValue)-recent-searches" }
|
||||
private var filtersKey: String { "\(mode.rawValue)-recent-filters" }
|
||||
|
||||
func saveSearch(_ search: ConsoleSearchTerm) {
|
||||
// If the user changes the type o the search, remove the old ones:
|
||||
@@ -33,9 +30,7 @@ final class ConsoleSearchRecentSearchesStore {
|
||||
|
||||
func clearRecentSearches() {
|
||||
searches = []
|
||||
filters = []
|
||||
saveSearches()
|
||||
saveFilters()
|
||||
}
|
||||
|
||||
private func saveSearches() {
|
||||
@@ -44,19 +39,6 @@ final class ConsoleSearchRecentSearchesStore {
|
||||
}
|
||||
UserDefaults.standard.set((encode(searches) ?? "[]"), forKey: searchesKey)
|
||||
}
|
||||
|
||||
func saveFilter(_ filter: ConsoleSearchFilter) {
|
||||
filters.removeAll { type(of: $0.filter) == type(of: filter.filter) }
|
||||
filters.insert(filter, at: 0)
|
||||
saveFilters()
|
||||
}
|
||||
|
||||
private func saveFilters() {
|
||||
while filters.count > 20 {
|
||||
filters.removeLast()
|
||||
}
|
||||
UserDefaults.standard.set((encode(filters) ?? "[]"), forKey: filtersKey)
|
||||
}
|
||||
}
|
||||
|
||||
private func encode<T: Encodable>(_ value: T) -> String? {
|
||||
|
||||
Reference in New Issue
Block a user