Currently, moxy compiler doesn't generate correct ViewStateProvider classes for nested presenters, which leads to a NPE at runtime when trying to access view state.
By "nested" I mean defined in an interface or another class:
class SomeClass {
class MainPresenter : MvpPresenter<MainView>() {
...
}
}
Currently, moxy compiler doesn't generate correct
ViewStateProvider
classes for nested presenters, which leads to a NPE at runtime when trying to access view state.By "nested" I mean defined in an interface or another class:
or
We can easily fix this by taking into account enclosing classes.
The proposed solution doesn't break anything and works for both nested and non-nested presenters.