Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[iOS] fix ios unintended timetable switching when favoriting a session #1042

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,4 @@
}
},
"version" : "1.0"
}
}
23 changes: 13 additions & 10 deletions app-ios/Sources/TimetableFeature/TimetableReducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,21 @@ public struct TimetableReducer : Sendable{
}

case let .requestDay(dayTab):
return .run { send in
for try await timetables in try timetableClient.streamTimetable() {
let internalDay: DroidKaigi2024Day = switch dayTab {
case DayTab.day1:
DroidKaigi2024Day.conferenceDay1
case DayTab.day2:
DroidKaigi2024Day.conferenceDay2
return .concatenate(
.cancel(id: CancelID.connection),
.run { send in
for try await timetables in try timetableClient.streamTimetable() {
let internalDay: DroidKaigi2024Day = switch dayTab {
case DayTab.day1:
DroidKaigi2024Day.conferenceDay1
case DayTab.day2:
DroidKaigi2024Day.conferenceDay2
}
await send(.response(.success(timetables.dayTimetable(droidKaigi2024Day: internalDay).contents)))
}
await send(.response(.success(timetables.dayTimetable(droidKaigi2024Day: internalDay).contents)))
}
}
.cancellable(id: CancelID.connection)
.cancellable(id: CancelID.connection)
)

case .response(.success(let timetables)):
state.timetableItems = sortListIntoTimeGroups(timetableItems: timetables)
Expand Down
Loading