Skip to content

Commit

Permalink
Revert "Await before deleting frequency"
Browse files Browse the repository at this point in the history
This reverts commit 9ab03ee.
  • Loading branch information
pierr3 committed May 9, 2024
1 parent 9ab03ee commit 8efc74d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
2 changes: 1 addition & 1 deletion src/app/components/bootstrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const Bootsrap: React.FC = () => {
if (useRadioState.getState().isInactive(parseInt(frequency))) {
return;
}

useRadioState.getState().setCurrentlyRx(parseInt(frequency), false);
});

Expand Down
17 changes: 2 additions & 15 deletions src/app/components/sidebar/radio-status.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,8 @@ const RadioStatus: React.FC = () => {
if (!selectedRadio) {
return;
}
void window.api
.setFrequencyState(
selectedRadio.frequency,
false,
false,
false,
false,
false,
)
.then(() => {
setTimeout(() => {
void window.api.removeFrequency(selectedRadio.frequency);
removeRadio(selectedRadio.frequency);
}, 500);
});
void window.api.removeFrequency(selectedRadio.frequency);
removeRadio(selectedRadio.frequency);
};

const handleForceRefresh = () => {
Expand Down

0 comments on commit 8efc74d

Please sign in to comment.