Skip to content

Commit

Permalink
Fix Not Able to Switch Between AM and FM Stations While Playing
Browse files Browse the repository at this point in the history
  • Loading branch information
njfdev committed Jul 30, 2024
1 parent d1bccf6 commit 295b451
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ export default function Home() {
const [isSdrInUse, setIsSdrInUse] = useState(false);

appWindow.listen("rtlsdr_status", (event: { payload: string }) => {
if (event.payload != "stopped" && event.payload != "pausing") {
console.log(event.payload);
if (
!event.payload.endsWith("stopped") &&
!event.payload.endsWith("pausing")
) {
if (event.payload.startsWith("fm")) {
setOpenTab(StationType.FMRadio.toString());
} else if (event.payload.startsWith("am")) {
Expand Down

0 comments on commit 295b451

Please sign in to comment.