ThirtyInch icon indicating copy to clipboard operation
ThirtyInch copied to clipboard

Lint warning with sendToView, but not with deliverToView

Open Syex opened this issue 6 years ago • 0 comments

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.

Syex avatar Aug 07 '18 09:08 Syex