Skip to content

Instantly share code, notes, and snippets.

@ElonPark
Last active August 16, 2021 13:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ElonPark/9ccb05c7aacbd1c8826e92d9cac99517 to your computer and use it in GitHub Desktop.
Save ElonPark/9ccb05c7aacbd1c8826e92d9cac99517 to your computer and use it in GitHub Desktop.
routing call
// 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