[Code health] Clean up flow of state in SubmissionService
gino-m opened this issue · comments
Gino Miceli commented
- Remove
select
anddeselect
methods andsubmissionId
state; change submission id viaNavigationService
instead. - Use
combineLatestAll
to combine at active survey, selected LOI, current user andsubmissionId$
inNavigationService
. UsedistinctUntilChanged
on the result ofcombineLatestAll
to avoid hitting db multiple times. - Emit
LOADING
when any of the above changes, then loadSubmission$ - usedistinctUntilChanged
on return value of stream. - Remove unused code from
MainPageComponent
jcqli commented
Related to Async issues with RxJs
Gino Miceli commented
Trying to make Beta scope tractable; let's tackle this as part of the push for GA.