merge-requests/257/head test_1.22.1129-1
Tag 2022-11-30 17:36:14 -08:00
rodzic d92ea914c4
commit 6f33625650
3 zmienionych plików z 57 dodań i 40 usunięć

Wyświetl plik

@ -267,7 +267,6 @@
function updateCallsign(id)
{
var count = parseInt(userCount.innerHTML);
if (id in window.opener.g_gtFlagPins)
{
var obj = window.opener.g_gtFlagPins[id];
@ -288,10 +287,7 @@
if (obj.canmsg == false) show = false;
if (makeCallsignRow(obj, show) && show)
{
count++;
}
makeCallsignRow(obj, show);
if (obj.cid == g_currentId && messageInput.disabled == true && obj.live == true)
{
@ -312,19 +308,44 @@
var obj = document.getElementById(id);
if (obj)
{
if (obj.style.display == "")
{
count--;
}
allCallDiv.removeChild(obj);
}
}
updateCount();
}
function updateCount()
{
var count = 0;
if(allCallDiv.childElementCount > 0)
{
for (var x = allCallDiv.childNodes.length-1; x > -1; x--)
{
if (allCallDiv.childNodes[x].style.display != "none")
{
count++;
}
}
}
userCount.innerHTML = count;
}
function showAllCallsigns()
function removeAllChildNodes(parent)
{
var count = 0;
while (parent.firstChild)
{
parent.removeChild(parent.firstChild);
}
}
function showAllCallsigns(justSearching = false)
{
allCallDiv.style.display = "none";
if (justSearching == false)
{
removeAllChildNodes(allCallDiv);
}
for (const x in window.opener.g_gtFlagPins)
{
var obj = window.opener.g_gtFlagPins[x];
@ -345,11 +366,6 @@
if (obj.canmsg == false) show = false;
if (show)
{
count++;
}
makeCallsignRow(obj, show);
if (obj.cid == g_currentId && messageInput.disabled == true && obj.live == true)
@ -362,19 +378,8 @@
}
}
if(allCallDiv.childElementCount > 0)
{
for (var x = allCallDiv.childNodes.length-1; x > -1; x--)
{
if (!(allCallDiv.childNodes[x].id in window.opener.g_gtFlagPins))
{
allCallDiv.removeChild(allCallDiv.childNodes[x]);
}
}
}
updateBar(g_currentId);
userCount.innerHTML = count;
updateCount();
if (g_viewBand)
{
@ -394,6 +399,13 @@
viewMode.innerHTML = "All";
}
allCallDiv.style.display = "";
messagesRedraw();
}
function messagesRedraw()
{
showAllMessages();
Resize();
}
@ -443,8 +455,7 @@
g_currentId = "";
openId(what);
}
showAllMessages();
Resize();
messagesRedraw();
}
function updateEverything()
@ -548,7 +559,8 @@
if (id in window.opener.g_gtUnread)
{
delete window.opener.g_gtUnread[id];
showAllCallsigns();
updateCallsign(id);
showAllMessages();
}
}
messageTextDiv.innerHTML = worker;
@ -613,7 +625,7 @@
} else {
clearSearch.style.display = "none";
}
showAllCallsigns();
showAllCallsigns(true);
}
function doLookup(what)

Wyświetl plik

@ -10638,22 +10638,30 @@ function setGtShareButtons()
g_layerVectors.gtflags.setVisible(false);
clearGtFlags();
// Clear list
g_gtFlagPins = {};
g_gtFlagPins = Object()
g_gtMessages = Object();
g_gtUnread = Object();
g_gtIdToCid = Object();
g_gtCallsigns = Object();
g_gtSentAwayToCid = Object();
if (g_chatWindowHandle != null)
{
try
{
g_chatWindowHandle.hide();
g_chatWindowHandle.window.allCallDiv.innerHTML = "";
g_chatWindowHandle.window.updateCount();
}
catch (e)
{
console.error(e);
}
}
goProcessRoster();
}
gtShareFlagImg.src =
g_gtShareFlagImageArray[g_appSettings.gtShareEnable == false ? 0 : 1];
gtShareFlagImg.src = g_gtShareFlagImageArray[g_appSettings.gtShareEnable == false ? 0 : 1];
}
function setMulticastIp()

Wyświetl plik

@ -54,7 +54,7 @@ var g_gtLiveStatusUpdate = false;
var myChatId = 0;
var myRoom = 0;
var g_gtChatlistChangeCount = 0;
var g_gtCurrentMessageCount = 0;
function gtConnectChat()
@ -352,7 +352,6 @@ function gtChatUpdateCall(jsmesg)
g_layerSources.gtflags.addFeature(g_gtFlagPins[cid].pin);
}
}
g_gtChatlistChangeCount++;
g_gtCallsigns[g_gtFlagPins[cid].call] = cid;
updateChatWindow(cid);
}
@ -476,7 +475,6 @@ function gtChatNewList(jsmesg)
}
}
}
g_gtChatlistChangeCount++;
updateChatWindow();
}
@ -608,7 +606,6 @@ function gtChatStateMachine()
{
g_getEngineWasRunning = false;
closeGtSocket();
g_gtChatlistChangeCount = 0;
g_lastGtStatus = "";
}
}
@ -730,9 +727,9 @@ function newChatMessage(id, jsmesg)
try
{
hasFocus = g_chatWindowHandle.window.newChatMessage(id, jsmesg);
g_chatWindowHandle.window.messagesRedraw();
}
catch (e) {}
updateChatWindow();
}
return hasFocus;
}