Skip to content

Commit d19a15a

Browse files
committed
Merge remote-tracking branch 'origin/main' into shared-state-beta
2 parents ed88271 + 7e90901 commit d19a15a

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

Examples/SyncUps/SyncUps/RecordMeeting.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ struct RecordMeeting {
9292

9393
let secondsPerAttendee = Int(state.syncUp.durationPerAttendee.components.seconds)
9494
if state.secondsElapsed.isMultiple(of: secondsPerAttendee) {
95-
if state.speakerIndex == state.syncUp.attendees.count - 1 {
95+
if state.secondsElapsed == state.syncUp.duration.components.seconds {
9696
state.syncUp.insert(transcript: state.transcript)
9797
return .run { _ in await self.dismiss() }
9898
}

Sources/ComposableArchitecture/Effects/Publisher.swift

+2-9
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,11 @@ extension Effect {
55
///
66
/// - Parameter createPublisher: The closure to execute when the effect is performed.
77
/// - Returns: An effect wrapping a Combine publisher.
8-
public static func publisher<P: Publisher>(_ createPublisher: @escaping () -> P) -> Self
8+
public static func publisher<P: Publisher>(_ createPublisher: () -> P) -> Self
99
where P.Output == Action, P.Failure == Never {
1010
Self(
1111
operation: .publisher(
12-
withEscapedDependencies { continuation in
13-
Deferred {
14-
continuation.yield {
15-
createPublisher()
16-
}
17-
}
18-
}
19-
.eraseToAnyPublisher()
12+
createPublisher().eraseToAnyPublisher()
2013
)
2114
)
2215
}

0 commit comments

Comments
 (0)