EhPanda
EhPanda copied to clipboard
Fix most warnings
This pr fix all but two warnings before migrating to TCA 1.0.
Most of the warnings are
-
fireAndForget is deprecated
-
Conformance of 'EffectPublisher<Action, Failure>' to 'Publisher' is deprecated
The technique used here is turn methods in client to simple method or async method if it uses promise
For example:
- Turn
(Input) -> Effect<Never>
to(Input) -> Void
or(Input) async -> Void
- Turn
(Input) -> Effect<Output>
to(Input) -> Output
or(Input) async -> Output
Then make corresponding changes in reducers
The warnings left are
EhProfileRequest(action: .create, name: "EhPanda").effect.fireAndForget()
// and
extension Request {
var effect: Effect<Result<Response, AppError>> {
publisher.receive(on: DispatchQueue.main).catchToEffect()
}
Thank you for your PR again! We really need some contributions these days. (haven't release a update for six months XD)