Closed kgrigsby-codesmith closed 2 years ago
Hi, thanks for raising this. I hadn't considered that use case. It's possible to access withDelaysIfUnsupported
if you create a Binding from the variable, e.g.:
Binding(get: { self.routes }, set: { self.routes = $0 })
.withDelaysIfUnsupported { ... }
But it seems like there should be a less awkward way of achieving this.
Thanks, I did use that Binding trick. Then I ran into the other issue of calculateSteps returning empty when the screens were only different by their associated values.
I've added a slightly friendlier way of achieving this in a view model in v0.1.6
:
RouteSteps.withDelaysIfUnsupported(self, \.routes) {
$0.push(...)
$0.push(...)
$0.presentSheet(...)
}
Thanks for bringing attention to this.
Is it possible to use withDelaysIfUnsupported within a view model? I have "@Published var routes: Routes = []" defined in my view model. $routes gives me back a publisher and so withDelaysIfUnsupported is not found.