Closed nflahavan closed 1 year ago
Hi @nflahavan, I like the thought here. However since we are working with Observables, maybe it would be better to put that in a defer
?
let initialState = Observable.defer { .just(base.viewIfLoaded?.window != nil) }
Feel free to open a PR!
In the displayed variable created in
Reactive+UIViewController.swift
theinitialState
variable is set to false.Because of this initial state, if subscription to this observable occurs after a view is on screen the initial value will be
false
and will not change. This is a potential problem when contributingStepper
whosePresentable
is aUIViewController
.One potential solution would be to change the
initialState
like so:I'm happy to PR this change if others think it would be useful.