Skip to content

Commit

Permalink
fix(iosApp): use new kotlin models in agenda screen.
Browse files Browse the repository at this point in the history
  • Loading branch information
GerardPaligot committed May 10, 2024
1 parent bd42689 commit 982f067
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions iosApp/iosApp/screens/agenda/Agenda.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,15 @@ struct Agenda: View {
.pickerStyle(SegmentedPickerStyle())
}
List {
if (selectedAgenda != nil && selectedAgenda!.onlyFavorites && selectedAgenda!.talks.isEmpty) {
if (selectedAgenda != nil && selectedAgenda!.onlyFavorites && selectedAgenda!.sessions.isEmpty) {
NoFavoriteTalksView()
} else if (selectedAgenda != nil) {
ForEach(selectedAgenda!.talks.keys.sorted(), id: \.self) { time in
ForEach(selectedAgenda!.sessions.keys.sorted(), id: \.self) { time in
Section {
ForEach(selectedAgenda!.talks[time]!, id: \.id) { talk in
if (!talk.isPause) {
let sessionItems = selectedAgenda!.sessions[time]!
ForEach(0..<sessionItems.count, id: \.self) { talkIndex in
let session = sessionItems[talkIndex]
if let talk = session as? TalkItemUi {
TalkItemNavigation(
talk: talk,
onFavoriteClicked: onFavoriteClicked
Expand All @@ -59,8 +61,9 @@ struct Agenda: View {
.tint(iconColor)
.accessibilityLabel(Text(iconAction))
}
} else {
PauseView(title: talk.title)
}
if let eventSession = session as? EventSessionItemUi {
PauseView(title: eventSession.title)
}
}
} header: {
Expand Down

0 comments on commit 982f067

Please sign in to comment.