Skip to content

Commit

Permalink
๐Ÿ”จ ์ฆ๊ฒจ์ฐพ๊ธฐํ•œ ํ•™์‚ฌ์ผ์ • ์—ฐ๋„ ์ˆœ์„œ ๋ฒ„๊ทธ ์ˆ˜์ • (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
GyeongminKimGyeongminKim authored Oct 1, 2024
1 parent 648eeb3 commit baf064d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,13 @@ class FavoriteScheduleFragment : BaseFragment<FragmentFavoriteScheduleBinding>()
}

is UiState.Success -> {
// ์—ฐ๋„ ๋ฆฌ์ŠคํŠธ๋ฅผ ์˜ค๋ฆ„์ฐจ์ˆœ์œผ๋กœ ์ •๋ ฌ
yearList = groupSchedulesByYearAndMonth(it.data)
.map { scheduleGroup -> scheduleGroup.year }
.toMutableSet()
.sorted() // ์˜ค๋ฆ„์ฐจ์ˆœ์œผ๋กœ ์ •๋ ฌ
.toMutableSet()

groupSchedulesByYearAndMonth(it.data).forEach { yearList.add(it.year) }
val currentYear = Calendar.getInstance().get(Calendar.YEAR)

Expand Down

0 comments on commit baf064d

Please sign in to comment.