Closed pwillmann closed 4 years ago
Thanks for trying it out and reporting. I'll update the docs and try to fix this crash soon.
As far as interfaces go, you should be able to easily use rxjava by having your fragments implement both MvRxView, MockableMavericksView
. They both extend MavericksView
. I can also put this in the docs
I believe I've already fixed your crash in https://github.com/airbnb/MvRx/pull/461
Docs are fixed with https://github.com/airbnb/MvRx/pull/465
Really appreciate you trying it out and reporting issues :) Feel free to submit a PR for other doc improvements, it's very helpful to have fresh eyes on this stuff.
I'll try to push another beta version soon so you have the crash fix, we're just finalizing some more API changes for coroutine configuration now
Thanks a lot @elihart ! I will get back to it once the update is available :D.
Beta 2 is now out, let me know if you have any issues with it
MvRx:
2.0.0-beta1
Kotlin:1.4.10
I played around a bit with the new Mavericks/MvRx Version to test out the new Mockable and Launcher features, really cool stuff I am super excited for this to get out of beta! I found a few smaller issues and one blocker/crash.
mvrx-rxjava2
artifact. Unfortunately themvrx-mocking
artifact only suppurts coroutines, but just copying over theMockableMvRxView
and basing it onMockableMavericksView
worked fine.MavericksMocks.initialize(this)
but it should beMockableMavericks.initialize(this)
mvrx-launcher
artifact is needed to get access to theMavericksLauncherActivity
Now to the crash, as I am using Dagger Hilt and the jetpack navigation library for navigation I copied over the Launcher code from the sample app (https://github.com/airbnb/MvRx/blob/609a797954863ff7815cb697a8964f96db1d867e/sample/src/main/java/com/airbnb/mvrx/sample/LauncherActivity.kt). Fragments without arguments worked fine (only tested the default states so far) but fragments that use arguments with the help of the jetpack navigation arguments crash.
I get the following error message:
the mocks for the crashing fragment are provided like this: