Skip to content

Commit

Permalink
#41 Refactor : Code convention
Browse files Browse the repository at this point in the history
줄바꿈 적용했습니다.
  • Loading branch information
kimhyeri committed Feb 11, 2019
1 parent 9c277b6 commit 43991d8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tree/tree/Controller/Search/SearchViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ extension SearchViewController: FilterSettingDelegate {
keyword: String,
sort: String,
category: String,
language: String) {
language: String
) {
updateUserFilter(
keyword: keyword,
sort: sort,
Expand All @@ -338,15 +339,19 @@ extension SearchViewController: FilterSettingDelegate {
keyword: String,
sort: String,
category: String,
language: String) {
language: String
) {
searchFilter.updateValue(keyword, forKey: "keyword")
searchFilter.updateValue(sort, forKey: "sort")
searchFilter.updateValue(category, forKey: "category")
searchFilter.updateValue(language.lowercased(), forKey: "language")
}

private func userFilter() {
guard let userFilter = UserDefaults.standard.dictionary(forKey: "searchFilter") else { return }
guard
let userFilter = UserDefaults.standard.dictionary(forKey: "searchFilter") else {
return
}
if let keyword = userFilter["keyword"] as? String,
let sort = userFilter["sort"] as? String,
let category = userFilter["category"] as? String,
Expand Down

0 comments on commit 43991d8

Please sign in to comment.