-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Fix connecting wifi manually bug #685
Fix: Fix connecting wifi manually bug #685
Conversation
Fixes #640 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inappropriate logic implement, changes needed.
@@ -192,6 +193,7 @@ class WifiConnection extends PureComponent { | |||
|
|||
this.props.setManualIP(text); | |||
const server = new Server('Manual', text); | |||
this.props.addSelectedServerToList(server); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that we only support one single manual server (cause we only save one).
So everytime we call setSelectedServer()
, the server must be added to server list.
=> addSelectedServerToList()
action is not necessary, the logic can be put inside of setSelectedServer()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, i konw think so.
@@ -41,6 +41,22 @@ const setSelectedServer = (server) => (dispatch) => { | |||
dispatch(baseActions.updateState({ server })); | |||
}; | |||
|
|||
const addSelectedServerToList = (server) => (dispatch, getState) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The action will cause only server
present in servers
, but what we need is prepend selected server
to server list, not replacing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, that's make sense
f9c900a
to
c727a03
Compare
No description provided.