From 72552ca7e3eb19c951123cc98ce126528eb538da Mon Sep 17 00:00:00 2001 From: HyunJaeyeon Date: Sun, 1 Dec 2024 01:51:42 +0900 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20#104-=EC=82=AC=EC=A0=84=EC=88=9C?= =?UTF-8?q?=EC=9C=BC=EB=A1=9C=20=EC=A0=95=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../GameSetting/AnimeSelect/AnimeSelectView.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PepperoniV2/Presentation/GameSetting/AnimeSelect/AnimeSelectView.swift b/PepperoniV2/Presentation/GameSetting/AnimeSelect/AnimeSelectView.swift index ab0670a..07344c8 100644 --- a/PepperoniV2/Presentation/GameSetting/AnimeSelect/AnimeSelectView.swift +++ b/PepperoniV2/Presentation/GameSetting/AnimeSelect/AnimeSelectView.swift @@ -143,12 +143,13 @@ struct AnimeSelectView: View { /// 현재 보여지는 애니 리스트 private var currentAnimes: [Anime] { + let sortedAnimes = animes.sorted { $0.title < $1.title } if searchText.isEmpty { - return animes + return sortedAnimes } else { // 검색어 공백 제거 let normalizedSearchText = searchText.replacingOccurrences(of: " ", with: "") - return animes.filter { + return sortedAnimes.filter { // 애니 제목 공백 제거 let normalizedTitle = $0.title.replacingOccurrences(of: " ", with: "") return normalizedTitle.localizedCaseInsensitiveContains(normalizedSearchText) From 85551da1353da3af14ad43469bf11cb087eb7377 Mon Sep 17 00:00:00 2001 From: HyunJaeyeon Date: Sun, 1 Dec 2024 01:52:59 +0900 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20#104-=EC=96=B8=EC=96=B4=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20=EA=B8=B0=EC=A4=80=EC=9C=BC=EB=A1=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 사용자의 언어 설정 기준에서의 사전순으로 정렬 --- .../Presentation/GameSetting/AnimeSelect/AnimeSelectView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PepperoniV2/Presentation/GameSetting/AnimeSelect/AnimeSelectView.swift b/PepperoniV2/Presentation/GameSetting/AnimeSelect/AnimeSelectView.swift index 07344c8..bc481d7 100644 --- a/PepperoniV2/Presentation/GameSetting/AnimeSelect/AnimeSelectView.swift +++ b/PepperoniV2/Presentation/GameSetting/AnimeSelect/AnimeSelectView.swift @@ -143,7 +143,7 @@ struct AnimeSelectView: View { /// 현재 보여지는 애니 리스트 private var currentAnimes: [Anime] { - let sortedAnimes = animes.sorted { $0.title < $1.title } + let sortedAnimes = animes.sorted { $0.title.localizedCompare($1.title) == .orderedAscending } if searchText.isEmpty { return sortedAnimes } else {