Fixed feature clearRosterOnBandChange

merge-requests/201/merge
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 (g_pskBandActivityTimerHandle == null) pskGetBandActivity();
if (bandChange || modeChange) 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(); goProcessRoster();
redrawGrids(); redrawGrids();
redrawSpots(); redrawSpots();

Wyświetl plik

@ -60,32 +60,14 @@ function renderRoster(callRoster, rosterSettings)
// let visibleCallList = callRoster.filter(entry => entry.tx); // let visibleCallList = callRoster.filter(entry => entry.tx);
let visibleCallList = []; 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) for (entry in callRoster)
{ {
// entry should populate in general // entry should populate in general
if (callRoster[entry].tx) 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]); visibleCallList.push(callRoster[entry]);
} }
} }
else if (!window.opener.g_appSettings.clearRosterOnBandChange)
{
visibleCallList.push(callRoster[entry]);
}
}
}
let totalCount = Object.keys(callRoster).length; let totalCount = Object.keys(callRoster).length;
let visibleCount = visibleCallList.length; let visibleCount = visibleCallList.length;