Skip to content

Commit

Permalink
✨ (LekaApp): Display ActivityView (placeholder atm) on start activity…
Browse files Browse the repository at this point in the history
… press
  • Loading branch information
ladislas committed Feb 21, 2024
1 parent 21d7dae commit fad31a1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@

import AccountKit
import Combine
import ContentKit
import DesignKit
import GameEngineKit
import LocalizationKit
import RobotKit
import SwiftUI
Expand Down Expand Up @@ -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

Check warning on line 141 in Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/MainView.swift

View workflow job for this annotation

GitHub Actions / swiftlint

TODOs should be resolved ((@ladislas) switch back to act...) (todo)
// ActivityView(activity: activity)
}
.sheet(isPresented: self.$rootOwnerViewModel.isSettingsViewPresented) {
SettingsView()
}
Expand Down

0 comments on commit fad31a1

Please sign in to comment.