Skip to content
This repository has been archived by the owner on Jan 6, 2024. It is now read-only.

Commit

Permalink
refactor: 유저 검색 시 정렬버튼 클릭 시 모든데이터를 가져오는 로직 개선 #80
Browse files Browse the repository at this point in the history
  • Loading branch information
llghdud921 committed Jul 25, 2022
1 parent 629e346 commit be4528e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ class UserSearchViewController: UIViewController {
let output = viewModel?.transform(input: input)

output?.searchWithQueryInformation
.filter { $0 != "" || $1.0 != [] || $1.1 != [] }
.subscribe(onNext: { (searchText, informations) in
self.setUserList(searchQuery: searchText, jobs: informations.0, interests: informations.1)
})
Expand Down Expand Up @@ -195,6 +194,9 @@ extension UserSearchViewController {
func setUserList(searchQuery: String, jobs: [String], interests: [String]) {
self.page = 0
self.list = []
guard searchQuery != "" && jobs != [] && interests != [] else {
return
}
self.viewModel?.searchUsers(
searchQuery: searchQuery,
jobs: jobs,
Expand Down

0 comments on commit be4528e

Please sign in to comment.