Fixed feature clearRosterOnBandChange

merge-requests/210/head
Tag 2022-10-02 14:42:21 -07:00
rodzic 5d30d2effc
commit 48bb2bd548
2 zmienionych plików z 8 dodań i 19 usunięć

Wyświetl plik

@ -6520,6 +6520,13 @@ function handleWsjtxStatus(newMessage)
if (g_pskBandActivityTimerHandle == null) pskGetBandActivity();
if (bandChange || modeChange)
{
if (g_appSettings.clearRosterOnBandChange)
{
for (const call in g_callRoster)
{
if (g_callRoster[call].callObj.instance == newMessage.instance) { delete g_callRoster[call]; }
}
}
goProcessRoster();
redrawGrids();
redrawSpots();

Wyświetl plik

@ -60,30 +60,12 @@ function renderRoster(callRoster, rosterSettings)
// let visibleCallList = callRoster.filter(entry => entry.tx);
let visibleCallList = [];
let band =
window.opener.g_appSettings.gtBandFilter == "auto"
? window.opener.g_appSettings.myBand
: window.opener.g_appSettings.gtBandFilter.length == 0
? ""
: window.opener.g_appSettings.gtBandFilter;
for (entry in callRoster)
{
// entry should populate in general
if (callRoster[entry].tx)
{
// check setting for call roster clear on band change.
// if true and band is current band, populate
if (window.opener.g_appSettings.clearRosterOnBandChange)
{
if (callRoster[entry].callObj.band == band)
{
visibleCallList.push(callRoster[entry]);
}
}
else if (!window.opener.g_appSettings.clearRosterOnBandChange)
{
visibleCallList.push(callRoster[entry]);
}
visibleCallList.push(callRoster[entry]);
}
}