Skip to content

Commit

Permalink
tidied
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBAndrews committed Oct 1, 2023
1 parent a199abd commit 561c6b2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
1 change: 0 additions & 1 deletion Mlem/Repositories/PersistenceRepository.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ class PersistenceRepository {
}

func saveRecentSearches(for accountHash: Int, with searches: [ContentModelIdentifier]) async throws {
// get recent searches
var extant = load([Int: [ContentModelIdentifier]].self, from: Path.recentSearches) ?? [:]
extant[accountHash] = searches
try await save(extant, to: Path.recentSearches)
Expand Down
2 changes: 0 additions & 2 deletions Mlem/Views/Tabs/Search/SearchView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,12 @@ struct SearchView: View {
.textInputAutocapitalization(.never)
.onAppear {
Task(priority: .background) {
// if !recentSearchesTracker.hasLoaded {
do {
try await recentSearchesTracker.reloadRecentSearches()
} catch {
print("Error while loading recent searches: \(error.localizedDescription)")
errorHandler.handle(error)
}
// }
}
}
}
Expand Down

0 comments on commit 561c6b2

Please sign in to comment.