Last active
August 16, 2021 13:18
-
-
Save ElonPark/9ccb05c7aacbd1c8826e92d9cac99517 to your computer and use it in GitHub Desktop.
routing call
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// MARK: - transform mutation | |
func transform(mutation: Observable<Mutation>) -> Observable<Mutation> { | |
return mutation | |
.withUnretained(self) | |
.flatMap { this, mutation -> Observable<Mutation> in | |
switch mutation { | |
case .attachUserInformationRIB: | |
return this.attachUserInformationRIBTransform() | |
default: | |
return .just(mutation) | |
} | |
} | |
} | |
/// Show selected user information | |
private func attachUserInformationRIBTransform() -> Observable<Mutation> { | |
router?.attachUserInformationRIB() | |
return .empty() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment