Skip to content

Commit

Permalink
refactor: #146 search - navigation MVI 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
juri123123 committed Jan 24, 2025
1 parent 6cbf720 commit b0b6ae0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Spoony-iOS/Spoony-iOS/Source/Feature/Search/SearchStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ final class SearchStore: ObservableObject {
private func handleClearSearch() {
model.searchText = ""
state = .empty
navigationManager.dispatch(.pop(1))
}

private func handleRemoveRecentSearch(_ search: String) {
Expand All @@ -81,8 +82,8 @@ final class SearchStore: ObservableObject {
}

private func handleLocationSelection(_ result: SearchResult) {
navigationManager.currentLocation = result.title
navigationManager.pop(1)
navigationManager.dispatch(.changeCurrentLocation(result.title))
navigationManager.dispatch(.pop(1))
}

private func updateSearchResults(with query: String) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ struct SearchView: View {
),
onBackTapped: {
store.dispatch(.clearSearch)
navigationManager.pop(1)
},
tappedAction: {
store.dispatch(.search)
Expand Down

0 comments on commit b0b6ae0

Please sign in to comment.