Fix spots when in realtime mode

Canadian-Provinces-Territories-Award-Layer
Paul Traina 2020-12-13 18:25:39 -08:00
rodzic 8cb284fbcc
commit d9e380fa93
1 zmienionych plików z 5 dodań i 9 usunięć

Wyświetl plik

@ -1508,10 +1508,8 @@ function viewRoster() {
continue; continue;
var spotString = ""; var spotString = "";
var spotSnr = null;
if (g_rosterSettings.columns.Spot && newCallList[x].qrz == false) { if (g_rosterSettings.columns.Spot && newCallList[x].qrz == false) {
spotString = getSpotString(newCallList[x]); spotString = getSpotString(newCallList[x]);
if (spotString != "") spotSnr = newCallList[x].spot.snr;
if (g_rosterSettings.onlySpot && spotString == "") continue; if (g_rosterSettings.onlySpot && spotString == "") continue;
} }
var grid = var grid =
@ -1752,11 +1750,8 @@ function viewRoster() {
thisCall + thisCall +
newCallList[x].band + newCallList[x].band +
newCallList[x].mode + newCallList[x].mode +
"' " + "'>" +
(spotSnr ? "title='" + spotSnr + "'" : "") +
">" +
spotString + spotString +
(spotSnr ? " / " + spotSnr : "") +
"</td>"; "</td>";
if (g_rosterSettings.columns.Life) if (g_rosterSettings.columns.Life)
worker += worker +=
@ -1989,13 +1984,14 @@ function realtimeRoster() {
} }
function getSpotString(callObj) { function getSpotString(callObj) {
var result = "";
if (callObj.spot && callObj.spot.when > 0) { if (callObj.spot && callObj.spot.when > 0) {
when = timeNowSec() - callObj.spot.when; when = timeNowSec() - callObj.spot.when;
if (when <= window.opener.g_receptionSettings.viewHistoryTimeSec) if (when <= window.opener.g_receptionSettings.viewHistoryTimeSec)
return parseInt(when).toDHMS(); result = parseInt(when).toDHMS();
} }
if (result) result += " / " + callObj.spot.snr;
return ""; return result;
} }
function openChatToCid(cid) { function openChatToCid(cid) {