Skip to content

Commit

Permalink
removing unnecessary updateSettingValue call
Browse files Browse the repository at this point in the history
  • Loading branch information
= authored and antheas committed Aug 18, 2024
1 parent e5c2c50 commit 39437a5
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/model/controller.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,13 @@ const goIn = (s: typeof store) => {
return;
}

const val = selectSettingState(path)(state) as any;

switch (setting.type) {
case "bool":
s.dispatch(
updateSettingValue({
cred: { token, endpoint: url },
path,
value: !val,
value: !curr,
})
);
break;
Expand Down Expand Up @@ -107,14 +105,6 @@ const goIn = (s: typeof store) => {
case "multiple":
// case "discrete":
if (isSel) {
if (curr !== selChoice)
s.dispatch(
updateSettingValue({
cred: { token, endpoint: url },
path,
value: selChoice,
})
);
s.dispatch(hhdSlice.actions.unselect());
} else {
s.dispatch(hhdSlice.actions.select());
Expand Down

0 comments on commit 39437a5

Please sign in to comment.