Skip to content

Commit

Permalink
Merge pull request #228 from neilenns/neilenns/issue227
Browse files Browse the repository at this point in the history
Send `kStationAdded` when frequencies are added
  • Loading branch information
pierr3 authored Nov 24, 2024
2 parents 3d2fdae + 187ce6c commit f0aaa31
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backend/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,9 @@ Napi::Boolean AddFrequency(const Napi::CallbackInfo& info)
newState.headset = true;
newState.xca = false;

// Issue 227: Make sure to publish the frequency was added to any connected clients.
MainThreadShared::mApiServer->publishStationAdded(callsign, frequency);

auto result = RadioHelper::SetRadioState(MainThreadShared::mApiServer, newState, callsign);
return Napi::Boolean::New(info.Env(), result);
}
Expand Down

0 comments on commit f0aaa31

Please sign in to comment.