alexsullivan114
04/18/2019, 8:58 PMWarning: The created observable keeps a strong reference to* to free this reference. Since we're not supposed to hold hard references to an activity or fragment or view in a. Unsubscribeview
ViewModel
from the architecture components, should we avoid passing an observable produced via RxBindings into a ViewModel
?Cody Engel
04/18/2019, 9:30 PMalexsullivan114
04/19/2019, 11:23 AMCody Engel
04/19/2019, 1:58 PMdewildte
04/19/2019, 7:00 PMCody Engel
04/19/2019, 7:00 PMdewildte
04/19/2019, 7:04 PMViewModel
.
Another way to do it is by having a method on the ViewModel
you call.
Use an intermediate object that subscribes to the bindings and calls the method on the ViewModel
ViewModel
Cody Engel
04/19/2019, 7:06 PMdewildte
04/19/2019, 7:07 PMCody Engel
04/19/2019, 7:08 PMdewildte
04/19/2019, 7:08 PMViewModel
Cody Engel
04/19/2019, 7:13 PMdewildte
04/19/2019, 7:13 PMCody Engel
04/19/2019, 7:13 PMdewildte
04/19/2019, 7:13 PMalexsullivan114
04/19/2019, 7:40 PMalexsullivan114
04/19/2019, 7:59 PMViewModel
was a thing soCody Engel
04/19/2019, 8:00 PMdewildte
04/19/2019, 8:05 PM.takeUntil(Observable)
seems to be a nice solution.CompositeDisposable
for this kinda usecse.alexsullivan114
04/19/2019, 8:47 PMdewildte
04/19/2019, 8:47 PMalexsullivan114
04/19/2019, 8:54 PMursus
04/20/2019, 2:43 PMdewildte
04/20/2019, 4:55 PMursus
04/20/2019, 10:01 PMdewildte
04/22/2019, 1:27 AMursus
04/22/2019, 4:18 PMalexsullivan114
04/24/2019, 1:59 PMCody Engel
04/24/2019, 5:18 PMSam
05/02/2019, 3:27 AMalexsullivan114
05/02/2019, 2:18 PMSam
05/02/2019, 2:22 PMCody Engel
05/03/2019, 2:32 PMalexsullivan114
05/03/2019, 8:04 PM