Corey Lanier
11/03/2020, 8:31 PMdata class FeaturedState(
val hospitalData: HospitalsViewModel = HospitalsViewModel(),
val dealsData: DealsViewModel = DealsViewModel(),
val marketingType: MarketingType = MarketingType.generalHealth
) : MvRxState
I’m attempting to morph both hospitalData
and dealsData
on two separate api calls. However when I try to change the value of dealsData
, I receive this error:
Change parameter hospitalData type primary constructor class of class FeaturedState to DealsViewModel
Not sure what I’m doing wrong that it’s trying to set it on hospitalData instead of dealsData.
Here is the function that runs the API calls: https://hatebin.com/owjqvhydazelihart
11/03/2020, 11:56 PM