You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When generating code in Artist from the KotlinApiHelper we get the following
public open override fun clicks(): Observable<Unit> {
if (clicks == null) {
....
rxview_longCl().map()
.doOnNext(UiChecks.checkClickableRequirementsAction(this))
.doOnNext(ViewAnalytics.logTapFor(this, getContext())).subscribe(clicks)
}
}
....
}
The Kotlin compiler assumes that the clicks in the subscribe method is null even though we set it a few lines prior. A possible fix for this is adding a let call before the rx chain. This way we will prevent the compiler from prompting
smart cast to 'PublishRelay<Unit>' is impossible, because 'clicks' is a mutable property that could have been changed by this time
How we're planning on solving it
public open override fun clicks(): Observable<Unit> {
if (clicks == null) {
....
clicks?.let {
rxview_longCl().map()
.doOnNext(UiChecks.checkClickableRequirementsAction(this))
.doOnNext(ViewAnalytics.logTapFor(this, getContext())).subscribe(it)
}
}
}
....
}
The text was updated successfully, but these errors were encountered:
The Kotlin compiler assumes that the clicks in the subscribe method is null even though we set it a few lines prior. A possible fix for this is adding a let call before the rx chain. This way we will prevent the compiler from prompting
How we're planning on solving it
The text was updated successfully, but these errors were encountered: