Skip to content
This repository has been archived by the owner on Oct 31, 2020. It is now read-only.

Custom state change issue #18

Open
Im-PJ opened this issue Jun 15, 2020 · 3 comments
Open

Custom state change issue #18

Im-PJ opened this issue Jun 15, 2020 · 3 comments

Comments

@Im-PJ
Copy link

Im-PJ commented Jun 15, 2020

Considering a change of states as described below, state change at point C doesn't work, it still remains at last state.
A. CurrentState = State.Custom; CustomStateKey = "Login";
B. CurrentState = State.None;
C. CurrentState = State.Custom; CustomStateKey = "Login";

I guess its because CustomStateKey is the same between those changes so StateSquid doesn't detect any change. If I set CustomStateKey = string.Empty at the beginning of point C, then state change works as expected

Is this a bug or expected behavior?

@sthewissen
Copy link
Owner

sthewissen commented Sep 3, 2020

Sorry for the very late reply. This library has kind of gone off the radar for me a bit as not much happened in here :) I would say it's a bug, as changing state to non Custom values should probably clear the CustomStateKey you set.

@Im-PJ
Copy link
Author

Im-PJ commented Sep 3, 2020

Its amazing you replied. most wouldn't care after a while. Thanks. I'm still using the library though ;)

@sthewissen
Copy link
Owner

Then I will try to push an update for you :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants