diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/Activities/ActivityDetailsView.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/Activities/ActivityDetailsView.swift index 2d88209e86..08d4022ffe 100644 --- a/Apps/LekaApp/Sources/_NEWCodeBase/Views/Activities/ActivityDetailsView.swift +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/Activities/ActivityDetailsView.swift @@ -114,6 +114,7 @@ struct ActivityDetailsView: View { ToolbarItem { Button { print("Start activity") + self.navigation.currentActivity = self.activity } label: { Image(systemName: "play.circle") Text("Start activity") @@ -129,6 +130,8 @@ struct ActivityDetailsView: View { @State private var selectedAuthor: Author? @State private var selectedSkill: Skill? @State private var selectedHMI: HMIDetails? + + private let navigation: Navigation = .shared } #Preview { diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/MainView.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/MainView.swift index 5127f81e6a..3513daa912 100644 --- a/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/MainView.swift +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/MainView.swift @@ -4,7 +4,9 @@ import AccountKit import Combine +import ContentKit import DesignKit +import GameEngineKit import LocalizationKit import RobotKit import SwiftUI @@ -132,6 +134,13 @@ struct MainView: View { .fullScreenCover(isPresented: self.$isCaregiverPickerPresented) { CaregiverPicker() } + .fullScreenCover(item: self.$navigation.currentActivity) { + self.navigation.currentActivity = nil + } content: { activity in + Text("Activity: \(activity.details.title)") + // TODO: (@ladislas) switch back to activity view + // ActivityView(activity: activity) + } .sheet(isPresented: self.$rootOwnerViewModel.isSettingsViewPresented) { SettingsView() }