no need to await here as settings take a while to effect, we watch them elsewhere

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2020-03-13 14:50:41 +00:00
parent 401d85ea6f
commit 84332184b5
2 changed files with 3 additions and 3 deletions

View file

@ -59,13 +59,13 @@ limitations under the License.
right: 12px;
height: 16px;
width: 16px;
margin-top: 4px;
&::after {
content: "";
position: absolute;
width: 16px;
height: 16px;
top: 4px;
mask-repeat: no-repeat;
mask-position: center;
mask-size: contain;

View file

@ -146,7 +146,7 @@ const NetworkDropdown = ({onOptionChange, protocols = {}, selectedServerName, se
if (!ok) return;
// delete from setting
await SettingsStore.setValue(SETTING_NAME, null, "account", servers.filter(s => s !== server));
SettingsStore.setValue(SETTING_NAME, null, "account", servers.filter(s => s !== server));
// the selected server is being removed, reset to our HS
if (serverSelected === server) {
@ -195,7 +195,7 @@ const NetworkDropdown = ({onOptionChange, protocols = {}, selectedServerName, se
if (!userDefinedServers.includes(newServer)) {
const servers = [...userDefinedServers, newServer];
await SettingsStore.setValue(SETTING_NAME, null, "account", servers);
SettingsStore.setValue(SETTING_NAME, null, "account", servers);
}
onOptionChange(newServer); // change filter to the new server