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.
This is a new pull request following the discussion in https://github.com/moxy-community/Moxy/pull/106 For some reason github wouldn't update my first pull request even though I updated my branch, hence I closed https://github.com/moxy-community/Moxy/pull/106 and created this new PR.