Skip to content

Commit

Permalink
Merge pull request #150 from MaximPestryakov/bootstrapper_variance
Browse files Browse the repository at this point in the history
Fixed Bootstrapper variance
  • Loading branch information
CherryPerry authored Sep 25, 2021
2 parents 8988329 + c4e0e30 commit 137cc77
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ class Feature2(
sealed class Effect {
object StartedLoading : Effect()
data class LoadedImage(val url: String) : Effect()
data class ErrorLoading(val throwable : Throwable) : Effect()
data class ErrorLoading(val throwable: Throwable) : Effect()
}

sealed class News {
data class ErrorExecutingRequest(val throwable: Throwable) : News()
}

class BootStrapperImpl : Bootstrapper<Wish> {
override fun invoke(): Observable<Wish> = just(LoadNewImage)
override fun invoke(): Observable<out Wish> = just(LoadNewImage)
}

class ActorImpl : Actor<State, Wish, Effect> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ package com.badoo.mvicore.element

import io.reactivex.Observable

typealias Bootstrapper<Action> = () -> Observable<Action>
typealias Bootstrapper<Action> = () -> Observable<out Action>

0 comments on commit 137cc77

Please # to comment.