Skip to content

Commit

Permalink
Merge pull request #178 from RxSwiftCommunity/release/2-12-4
Browse files Browse the repository at this point in the history
fix: reentrancy issue with forwardToCurrentFlow
  • Loading branch information
twittemb authored Aug 18, 2021
2 parents c585cb6 + 1dcdefe commit 8114d47
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
** Version 2.12.4 **:

- fix reentrancy issue with forwardToCurrentFlow

** Version 2.12.3 **:

- fix "Unhandled files" warnings in the Package.swift file
Expand Down
2 changes: 1 addition & 1 deletion RxFlow.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxFlow"
s.version = "2.12.3"
s.version = "2.12.4"
s.swift_version = '5.4'
s.summary = "RxFlow is a navigation framework for iOS applications, based on a Reactive Coordinator pattern."

Expand Down
4 changes: 2 additions & 2 deletions RxFlow.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.12.3;
MARKETING_VERSION = 2.12.4;
PRODUCT_BUNDLE_IDENTIFIER = io.warpfactor.RxFlow;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down Expand Up @@ -639,7 +639,7 @@
"@executable_path/Frameworks",
"@loader_path/Frameworks",
);
MARKETING_VERSION = 2.12.3;
MARKETING_VERSION = 2.12.4;
PRODUCT_BUNDLE_IDENTIFIER = io.warpfactor.RxFlow;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
4 changes: 3 additions & 1 deletion RxFlow/FlowCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ public final class FlowCoordinator: NSObject {
private func performSideEffects(with flowContributor: FlowContributor) {
switch flowContributor {
case let .forwardToCurrentFlow(step):
self.stepsRelay.accept(step)
DispatchQueue.main.async { [weak self] in
self?.stepsRelay.accept(step)
}
case let .forwardToParentFlow(step):
parentFlowCoordinator?.stepsRelay.accept(step)
case .contribute:
Expand Down
2 changes: 1 addition & 1 deletion RxFlowTests/FlowCoordinatorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ final class FlowCoordinatorTests: XCTestCase {

// Then: Steps from .multiple FlowContributors are triggered.toArray()
let actualSteps = try? testFlow.recordedSteps.take(3).toBlocking().toArray()
XCTAssertEqual(actualSteps, [.multiple, .one, .two])
XCTAssertEqual(actualSteps, [.multiple, .two, .one])
}

func testStepHasBeenFilteredBeforeNavigateForAFlowStepper() {
Expand Down

0 comments on commit 8114d47

Please sign in to comment.