You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation of WiFiTransitions.actions includes "Transitions through the disabled state are ignored".
Background: I'm migrating my WiFi transitions from ControlPlane, whose WiFi evidence source broke in Catalina and does not seem to be being maintained.
This includes both "from" and "to" actions. But most commonly I go "from" a network, to no network, "to" another network. In that case, the current network is nil in the middle, so the "from" actions never execute.
I could see a few possibilities to fix this: (optionally?) allow triggering on "no network" — which would actually be more consistent with what I want — or just don't save "nil" as the previous network given you'll never act on it in any case, delaying the "from" action until a new network is joined.
These both seem like very small changes so I'm happy to put together a pull request. Thoughts?
The text was updated successfully, but these errors were encountered:
nriley
changed the title
WiFiTransitions: "from" never runs because transitions to/from nil are filtered
WiFiTransitions: ”from” never runs because transitions to/from nil are filtered
Jan 19, 2020
I haven’t used this spoon (didn’t know it existed actually, so I’ll have to take a look at it) but I can imagine a case where I’d want to know that I had left a network and gone to “no” (or nil) network... Given that my understanding is limited to what you’ve described here, so far, I think I’d rather fire the “to” for nil and then if the next “to” doesn”t follow a “from”, slip a nil “from” in ahead of it... yeah they will fire one right after the other, but its the behavior I’d expect — I can decide if I care about the “from” no network in my callback and just return immediately if I don’t care.
Ok having read the description of the spoon now, I guess I think the best approach would be to add a spoon level variable to enable/disable nil notifications. By default, leave it off, so spoon behavior maintains backwards compatibility, but those of us that want to know about these transitions can enable them.
nriley
added a commit
to nriley/Spoons
that referenced
this issue
Jan 19, 2020
The documentation of
WiFiTransitions.actions
includes "Transitions through the disabled state are ignored".Background: I'm migrating my WiFi transitions from ControlPlane, whose WiFi evidence source broke in Catalina and does not seem to be being maintained.
This includes both "from" and "to" actions. But most commonly I go "from" a network, to no network, "to" another network. In that case, the current network is nil in the middle, so the "from" actions never execute.
I could see a few possibilities to fix this: (optionally?) allow triggering on "no network" — which would actually be more consistent with what I want — or just don't save "nil" as the previous network given you'll never act on it in any case, delaying the "from" action until a new network is joined.
These both seem like very small changes so I'm happy to put together a pull request. Thoughts?
The text was updated successfully, but these errors were encountered: