GCX-HCI / ThirtyInch

a MVP library for Android favoring a stateful Presenter
Apache License 2.0
1.03k stars 101 forks source link

Lint warning with sendToView, but not with deliverToView #156

Open Syex opened 6 years ago

Syex commented 6 years ago
class SomePresenter: TiPresenter<SomeView>() {

  class Something(val presenter: SomePresenter) {

    fun doStuff() {
      presenter.sendToView { it.showSomething() }
    }
  }
}

Here Lint marks the usage of sendToView as an error, because the method is annotated with @RestrictTo(SUBCLASSES):

TiPresenter.sendToView can only be called from subclasses

However, replacing the function with the new deliverToView() there is no Lint warning. It should be consistent I guess.