diff --git a/Animal-Crossing-Wiki/Animal-Crossing-Wiki/Dashboard/Coordinator/DashboardCoordinator.swift b/Animal-Crossing-Wiki/Animal-Crossing-Wiki/Dashboard/Coordinator/DashboardCoordinator.swift index 61fd3094..6880b778 100644 --- a/Animal-Crossing-Wiki/Animal-Crossing-Wiki/Dashboard/Coordinator/DashboardCoordinator.swift +++ b/Animal-Crossing-Wiki/Animal-Crossing-Wiki/Dashboard/Coordinator/DashboardCoordinator.swift @@ -42,7 +42,8 @@ final class DashboardCoordinator: Coordinator { userInfoVM: UserInfoSectionViewModel(), tasksVM: TodaysTasksSectionViewModel(coordinator: self), villagersVM: VillagersSectionViewModel(coordinator: self), - progressVM: CollectionProgressSectionViewModel(coordinator: self) + progressVM: CollectionProgressSectionViewModel(coordinator: self), + musicPlayerVM: MusicPlayerViewModel(coordinator: self) ) rootViewController.addChild(viewController) } diff --git a/Animal-Crossing-Wiki/Animal-Crossing-Wiki/Dashboard/ViewControllers/DashboardViewController.swift b/Animal-Crossing-Wiki/Animal-Crossing-Wiki/Dashboard/ViewControllers/DashboardViewController.swift index 852418bd..7af766a6 100644 --- a/Animal-Crossing-Wiki/Animal-Crossing-Wiki/Dashboard/ViewControllers/DashboardViewController.swift +++ b/Animal-Crossing-Wiki/Animal-Crossing-Wiki/Dashboard/ViewControllers/DashboardViewController.swift @@ -52,7 +52,8 @@ class DashboardViewController: UIViewController { userInfoVM: UserInfoSectionViewModel, tasksVM: TodaysTasksSectionViewModel, villagersVM: VillagersSectionViewModel, - progressVM: CollectionProgressSectionViewModel + progressVM: CollectionProgressSectionViewModel, + musicPlayerVM: MusicPlayerViewModel ) { let userInfoSection = SectionView( title: "My Island".localized, @@ -74,7 +75,14 @@ class DashboardViewController: UIViewController { iconName: "chart.pie.fill", contentView: CollectionProgressView(viewModel: progressVM) ) - sectionsScrollView.addSection(userInfoSection, tasksSection, villagersSection, progressSection) + let musicPlayerSection = SectionView( + title: "Music Player".localized, + iconName: "music.quarternote.3", + contentView: MusicPlayerView(viewModel: musicPlayerVM) + ) + sectionsScrollView.addSection( + userInfoSection, tasksSection, villagersSection, progressSection, musicPlayerSection + ) } func bind(to viewModel: DashboardViewModel) {